Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Activate an Excel spreadsheet using wildcard name
Have a visual basic macro to parse info from excel sheet
to another excel sheet with consolidated info. Ex: Parse all of the inventory items from "location A.xls" to "consolidated inventory.xls" sheet. Question: how do I get the macro to parse the info from the sheet I want, whatever that sheets name is. I.E. I want to parse from "location A.xls" sheet, "location B.xls" sheet etc. The macro needs to give me the option of selecting the sheet I want to parse from, or, if I can use wildcard (*.xls) in the macro, even better. Thanx |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Activate an Excel spreadsheet using wildcard name
Hi Dennis,
Either select the requisite worksheet and refer to it in your code as: Activesheet Alternatively, put up an input box at runtime to feed the sheet name. In your procedure add something like this: Dim sh As Variant Do Until sh < "" sh = Application.InputBox( _ Prompt:="Please enter name of " _ & "Worksheet to be consolidated", _ Title:="Worksheet Name", _ Type:=2) If sh = "False" Then Exit Sub 'User Cancelled Loop Then, in your code, replace the previously hard-code sheet name with the sh object variable. --- Regards, Norman "Dennis" wrote in message ... Have a visual basic macro to parse info from excel sheet to another excel sheet with consolidated info. Ex: Parse all of the inventory items from "location A.xls" to "consolidated inventory.xls" sheet. Question: how do I get the macro to parse the info from the sheet I want, whatever that sheets name is. I.E. I want to parse from "location A.xls" sheet, "location B.xls" sheet etc. The macro needs to give me the option of selecting the sheet I want to parse from, or, if I can use wildcard (*.xls) in the macro, even better. Thanx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I use a wildcard in an excel formula? | Excel Worksheet Functions | |||
Wildcard in Excel | Excel Worksheet Functions | |||
How can I get Excel to not view an * as a wildcard in a lookup? | Excel Discussion (Misc queries) | |||
De-activate the email on my spreadsheet? | Excel Discussion (Misc queries) | |||
Wildcard parameter in excel | Excel Discussion (Misc queries) |