Thread
:
Open specific sheet depending on cell contents
View Single Post
#
1
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Open specific sheet depending on cell contents
The macro recorder is your friend. I just recorded this and then modified.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 5/2/2006 by Don Guillett
'
'
'Workbooks.Open Filename:="C:\yourfolder\yourfilename.xls"
Workbooks.Open Filename:="C:\yourfolder\" & Range("a1") & ".xls"
End Sub
--
Don Guillett
SalesAid Software
"monkey harry" wrote in message
oups.com...
Hi,
I'm fairly new to
VB
and need to create a macro which will open another
workbook and more specifically a sheet within it depending on its
contents.
I'll try to be a bit clearer. Say cell "A1" contained the name of the
sheet in another workbook, can I get a macro to read the contents of
"A1" and open that specific sheet?
As I said I'm fairly new to this, so the actual code to do it would
excellent.
Thanks
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett