How to generate the range selection dialog box using vba in Excel?

前端 未结 2 529
情深已故
情深已故 2020-12-16 20:14

I have connected excel with mssql 2008 database and now the data is filled into excel but it is not a table. I want to create a table automatically when the data load.I have

相关标签:
2条回答
  • 2020-12-16 20:52

    I guess you could buid a form with a range control, but why not simply using ActiveCell as the destination range ?
    You could eventually add a MsgBox to confirm that "Table will be created at currently active cell. Click OK to continue, or Cancel" (or something similar).

    0 讨论(0)
  • 2020-12-16 20:55

    You cannot display the built in range dialog, but you can display a dialog box that asks for a range like this:

    Dim ThisRng As Range
    Set ThisRng = Application.InputBox("Select a range", "Get Range", Type:=8)
    
    0 讨论(0)
提交回复
热议问题