View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default 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