Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Slight typo/omission when modifying Chip's code:
Sub OpenFile() dim wbk as workbook set wbk = Workbooks.Open( filename:="C:\Whatever\book.xls") msgbox wbk.name msgbox thisworkbook.name End Sub -- Regards, Tom Ogilvy "Jim Thomlinson" wrote in message ... If you need to switch back and forth between the book that is running the code and the book you just opened add this to Chips code. Sub OpenFile() dim wbk as workbook set wbk = Workbooks.Open filename:="C:\Whatever\book.xls" msgbox wbk.name msgbox thisworkbook.name End Sub I hope that made sense. If not don't worry about it too much. I am renting to own my moment. Sixteen more easy payments and it is mine... :-) -- HTH... Jim Thomlinson "Chip Pearson" wrote: Create a button, and assign the following macro to it. Sub OpenFile() Workbooks.Open filename:="C:\Whatever\book.xls" End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Koataus" wrote in message ... I'm currious how to create a button in excel with the function of opening another specific excel file. Thanks for any help! Koataus -- Do the one thing you think you cannot do. Fail at it. Try again. Do better the second time. The only people who never tumble are those who never mount the high wire. This is your moment. Own it. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating a button to open a file | Excel Programming | |||
button to open a file | Excel Programming | |||
Create button to open a file | Excel Programming | |||
Button fails to call macro when open an Excel file from web | Excel Programming | |||
VBA - on a button event, open another closed file, post changes, close file | Excel Programming |