Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open File, pause macro until file is selected
-- Jim |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open File, pause macro until file is selected
Sorry, my post was not complete.
I have recorded macro that goes to a specifc directory and opens a Access DB and then I select the table and it is populated to my spreadsheet. Whta I want to be able to do is, once thee table window opens allow the user to select the table they want to import and then finish running hte macro. The Macro; Sub Macro1() ChDir "C:\Scc\db" Workbooks.OpenDatabase Filename:="C:\Scc\db\db1.mdb", CommandText:=Array( _ "UsageReport1"), CommandType:=xlCmdTable End Sub -- Jim "Jims" wrote: -- Jim |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open File, pause macro until file is selected
You can replace Arrray wirth a variable like shown below. You can set
myarrray to different string depending on which table is selected by the user. Sub Macro1() ChDir "C:\Scc\db" myArray = Array("UsageReport1"), Workbooks.OpenDatabase Filename:="C:\Scc\db\db1.mdb", CommandText:=myArray, CommandType:=xlCmdTable End Sub "Jims" wrote: Sorry, my post was not complete. I have recorded macro that goes to a specifc directory and opens a Access DB and then I select the table and it is populated to my spreadsheet. Whta I want to be able to do is, once thee table window opens allow the user to select the table they want to import and then finish running hte macro. The Macro; Sub Macro1() ChDir "C:\Scc\db" Workbooks.OpenDatabase Filename:="C:\Scc\db\db1.mdb", CommandText:=Array( _ "UsageReport1"), CommandType:=xlCmdTable End Sub -- Jim "Jims" wrote: -- Jim |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open Dialog Box to return Selected File Path and Not Open it. | Excel Programming | |||
Excel file does not open when selected | Excel Discussion (Misc queries) | |||
Macro To Open a User selected File | Excel Worksheet Functions | |||
Open a file do a macro ( made) and open next succesive file | Excel Programming | |||
Pause Macro For Start Row While Parsing a Text File | Excel Programming |