Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default aout open no workeee

When using the string below inserted in 'ThisWorkbook' code of a given file,
'It does not open the file, nor does it give any error message. HELP

Private Sub Auto_Open()
Auto.Open "Menu_List.xls"
End Sub

Thanks for any advice...
Mike

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default aout open no workeee

Hi Mike

Copy the Auto_Open sub in a normal mudule (not Thisworkbook or Sheet)

See
http://www.cpearson.com/excel/events.htm


--
Regards Ron De Bruin
http://www.rondebruin.nl



"Mike" wrote in message ...
When using the string below inserted in 'ThisWorkbook' code of a given file,
'It does not open the file, nor does it give any error message. HELP

Private Sub Auto_Open()
Auto.Open "Menu_List.xls"
End Sub

Thanks for any advice...
Mike



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default aout open no workeee


You have to call the sub..

and I don't know if auto.open would be the right syntax...

Try:

Workbooks.Open Filename:= "Menu_list.xls"
Windows("Menu_list.xls").Activate


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=553757

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default aout open no workeee

Thanks this worked!!....But what should I put in the code to have it
auto-return the the main page (from where it was opened)?

"Bearacade" wrote:


You have to call the sub..

and I don't know if auto.open would be the right syntax...

Try:

Workbooks.Open Filename:= "Menu_list.xls"
Windows("Menu_list.xls").Activate


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=553757


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default aout open no workeee


You want it to return to the spreadsheet/worksheet that it was at?

try taking out Windows("Menu_list.xls").Activate

or change it to Windows("Name of the original xls".Activat

--
Bearacad

-----------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...fo&userid=3501
View this thread: http://www.excelforum.com/showthread.php?threadid=55375



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default aout open no workeee

Thanks again.
Tried both and no luck. I'm sure there is a way...RiGHT?

"Bearacade" wrote:


You want it to return to the spreadsheet/worksheet that it was at?

try taking out Windows("Menu_list.xls").Activate

or change it to Windows("Name of the original xls".Activate


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=553757


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default aout open no workeee


aye.. my mistake.. no xls suffix..

Workbooks.Open Filename:="test.xls"
Windows("BOOK1").Activat

--
Bearacad

-----------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...fo&userid=3501
View this thread: http://www.excelforum.com/showthread.php?threadid=55375

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
ON OPEN VBA Code input incorrectly now excel sheet wont open mmartin New Users to Excel 1 February 16th 11 11:33 PM
Opening Excel, Book1 opens, remains open with other workbook open DanieB Excel Discussion (Misc queries) 0 September 3rd 09 08:23 AM
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 04:24 PM
workbooks.open function fails to open an existing excel file when used in ASP, but works in VB. san Excel Programming 1 January 3rd 06 03:22 AM
How do I stop Excel from closing the open file each time I open a. Welsin Setting up and Configuration of Excel 3 January 8th 05 11:16 PM


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

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

About Us

"It's about Microsoft Excel"