Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open sheet "LBUD*", how
I want the macro to open all sheets that starts with "LBUD". Can I d this by writing Sheets("LBUD*").Open Or doesn#t * work -- Ctec ----------------------------------------------------------------------- Ctech's Profile: http://www.excelforum.com/member.php...fo&userid=2774 View this thread: http://www.excelforum.com/showthread.php?threadid=48400 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open sheet "LBUD*", how
You open workbooks, not sheets.
Only one sheet can have the focus. Perhaps a clearer description of what what you want in the mean time to open workbook beginning with LBUD in a specific directory Sub ABCD() Dim sPath as String Dim sName as String sPath = "C:\My Folder\" sName = dir(sPath & "LBUD*.xls") do while sName < "" workbooks.Open sPath & sName sName = dir() Loop End Sub -- Regards, Tom Ogilvy "Ctech" wrote in message ... I want the macro to open all sheets that starts with "LBUD". Can I do this by writing Sheets("LBUD*").Open Or doesn#t * work? -- Ctech ------------------------------------------------------------------------ Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745 View this thread: http://www.excelforum.com/showthread...hreadid=484000 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open sheet "LBUD*", how
What I want the macro to do is to copy the range("A10:B15") for al sheets which starts with LBUD. And then paste into a blank workbook. i.e. Worksheet("LBUD (2)") will be activated / selected Worksheet("LBUD") will be activated / selected. Worksheet("BAND") will *not* be activated Hope this clearifies my problem. Thank -- Ctec ----------------------------------------------------------------------- Ctech's Profile: http://www.excelforum.com/member.php...fo&userid=2774 View this thread: http://www.excelforum.com/showthread.php?threadid=48400 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open sheet "LBUD*", how
Ctech,
Dim WS As Worksheet For Each WS In ThisWorkbook.Worksheets If WS.Name Like "LBUD*" Then 'Do your copy code 'etc End If Next NickHK "Ctech" wrote in message ... What I want the macro to do is to copy the range("A10:B15") for all sheets which starts with LBUD. And then paste into a blank workbook. i.e. Worksheet("LBUD (2)") will be activated / selected Worksheet("LBUD") will be activated / selected. Worksheet("BAND") will *not* be activated Hope this clearifies my problem. Thanks -- Ctech ------------------------------------------------------------------------ Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745 View this thread: http://www.excelforum.com/showthread...hreadid=484000 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. | Excel Discussion (Misc queries) | |||
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. | Setting up and Configuration of Excel | |||
Stop the "Personal" sheet from popping up every time I open a work | Excel Discussion (Misc queries) | |||
Please add a "sheet" function like "row" and "column" functions | Excel Programming | |||
a button to open up "My Computer" on an excel sheet | Excel Programming |