LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 542
Default source sheet name as a wild card

I was working on this late last night, than I remembered Ron de Bruin page
and he had some written for what I needed. I need a small modification on
this code. In the SourceShName line I have it pulling all sheets with the
name "Report", but some are my sheet names are called "Report 1, Report 2..."
How can I make it look for anything called Report* or something like that.

Sub RDB_Copy_Sheet()
Dim myFiles As Variant
Dim myCountOfFiles As Long

myCountOfFiles = Get_File_Names( _
MyPath:="H:\myprojdir\GWIS\Humble\Test\part2", _
Subfolders:=True, _
ExtStr:="*.xl*", _
myReturnedFiles:=myFiles)

If myCountOfFiles = 0 Then
MsgBox "No files that match the ExtStr in this folder"
Exit Sub
End If

Get_Sheet _
PasteAsValues:=True, _
SourceShName:="Repor*", _
SourceShIndex:=1, _
myReturnedFiles:=myFiles

End Sub

Thanks
 
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
wild card * transferxxx Excel Programming 3 November 9th 07 01:11 PM
Wild Card? fpd833 Excel Programming 0 September 20th 07 07:26 PM
Wild Card!!!??? Sean Excel Programming 3 August 31st 06 06:55 PM
Wild card * Herman Excel Worksheet Functions 0 October 21st 05 01:39 PM
Wild card in if then statements jstocka Excel Programming 5 April 29th 04 04:10 AM


All times are GMT +1. The time now is 04:03 AM.

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"