Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Excel Discussion (Misc queries) 0 April 23rd 09 08:53 PM
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Setting up and Configuration of Excel 0 April 23rd 09 08:53 PM
Stop the "Personal" sheet from popping up every time I open a work George B Excel Discussion (Misc queries) 2 December 21st 07 10:46 PM
Please add a "sheet" function like "row" and "column" functions Spreadsheet Monkey Excel Programming 2 November 8th 05 04:08 PM
a button to open up "My Computer" on an excel sheet DorisM Excel Programming 5 August 16th 05 08:32 PM


All times are GMT +1. The time now is 02:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"