Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel menu toolbar hyperlink issues

So I have an hyperlink to an excel file in the tool bar and I created
and auto_open macro to read a temporary csv I need retreive and format
data from. When I go to the directory and open the excel it work
flawlessly but when I run it as a menubar hyperlink to a file it
doesnt run the macro. Its Excel 2000. and the Excel file I'm opening
hides iteslf and then opens and formats the temporary CSV file for
display.

any thoughts on why it opens diffrently each way and how I can work
around this?

thanks,
-Cliff
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel menu toolbar hyperlink issues

Auto_open macros don't run when you open a workbook through code.

You need to put you auto_open code in the workbook_open event which will
run.

--
Regards,
Tom Ogilvy


"Cliff" wrote in message
om...
So I have an hyperlink to an excel file in the tool bar and I created
and auto_open macro to read a temporary csv I need retreive and format
data from. When I go to the directory and open the excel it work
flawlessly but when I run it as a menubar hyperlink to a file it
doesnt run the macro. Its Excel 2000. and the Excel file I'm opening
hides iteslf and then opens and formats the temporary CSV file for
display.

any thoughts on why it opens diffrently each way and how I can work
around this?

thanks,
-Cliff



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel menu toolbar hyperlink issues

Hmm no dice.

doesnt seem to run at all now. If it help heres what I'm doing:
----snip-----
Sub Workbook_Open()

Application.ScreenUpdating = False

ChDir "G:\Data Center Information\CSV"
Workbooks.Open Filename:="G:\somefolderonafixeddisk\CSV\NewVehTmp .CSV",
ReadOnly:=True, Editable:=False

Rows("1:1").Select
Selection.AutoFilter

Cells.EntireColumn.AutoFit

Range("A1").Select
ActiveCell.FormulaR1C1 = "MSCode"

Range("B1").Select
ActiveCell.FormulaR1C1 = "Year"

Range("C1").Select
ActiveCell.FormulaR1C1 = "Make"

Range("D1").Select
ActiveCell.FormulaR1C1 = "Model"

Range("E1").Select
ActiveCell.FormulaR1C1 = "Description"

Range("F1").Select
ActiveCell.FormulaR1C1 = "MSRP"

Rows("1:1").Select
With Selection.Interior
.ColorIndex = 48
.Pattern = xlSolid
.Interior.ColorIndex = 15
.Font.Bold = True
End With


Columns("B:B").Select
Selection.AutoFilter Field:=2, Criteria1:="2003"
Selection.Font.ColorIndex = 12
Selection.AutoFilter Field:=2, Criteria1:="2003.5"
Selection.Font.ColorIndex = 12
Selection.AutoFilter Field:=2, Criteria1:="2004"
Selection.Font.ColorIndex = 9
Selection.AutoFilter Field:=2, Criteria1:="2004.5"
Selection.Font.ColorIndex = 9
Selection.AutoFilter Field:=2, Criteria1:="2005"
Selection.Font.ColorIndex = 5

ActiveSheet.ShowAllData

Columns("A:F").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A1").Select

Application.ScreenUpdating = True

End Sub
----snip-----


"Tom Ogilvy" wrote in message ...
Auto_open macros don't run when you open a workbook through code.

You need to put you auto_open code in the workbook_open event which will
run.

--
Regards,
Tom Ogilvy


"Cliff" wrote in message
om...
So I have an hyperlink to an excel file in the tool bar and I created
and auto_open macro to read a temporary csv I need retreive and format
data from. When I go to the directory and open the excel it work
flawlessly but when I run it as a menubar hyperlink to a file it
doesnt run the macro. Its Excel 2000. and the Excel file I'm opening
hides iteslf and then opens and formats the temporary CSV file for
display.

any thoughts on why it opens diffrently each way and how I can work
around this?

thanks,
-Cliff

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel menu toolbar hyperlink issues

Sorry for my ignorance in this matter. I apparently dont even know
what to search for... So this is an "application level event"? I would
have to make it public? How does anyone read these Oriely books...
arg.

"Tom Ogilvy" wrote in message ...
Auto_open macros don't run when you open a workbook through code.

You need to put you auto_open code in the workbook_open event which will
run.

--
Regards,
Tom Ogilvy


"Cliff" wrote in message
om...
So I have an hyperlink to an excel file in the tool bar and I created
and auto_open macro to read a temporary csv I need retreive and format
data from. When I go to the directory and open the excel it work
flawlessly but when I run it as a menubar hyperlink to a file it
doesnt run the macro. Its Excel 2000. and the Excel file I'm opening
hides iteslf and then opens and formats the temporary CSV file for
display.

any thoughts on why it opens diffrently each way and how I can work
around this?

thanks,
-Cliff

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel menu toolbar hyperlink issues

Ahhh.. I see!!! thanks!

"Tom Ogilvy" wrote in message ...
Auto_open macros don't run when you open a workbook through code.

You need to put you auto_open code in the workbook_open event which will
run.

--
Regards,
Tom Ogilvy


"Cliff" wrote in message
om...
So I have an hyperlink to an excel file in the tool bar and I created
and auto_open macro to read a temporary csv I need retreive and format
data from. When I go to the directory and open the excel it work
flawlessly but when I run it as a menubar hyperlink to a file it
doesnt run the macro. Its Excel 2000. and the Excel file I'm opening
hides iteslf and then opens and formats the temporary CSV file for
display.

any thoughts on why it opens diffrently each way and how I can work
around this?

thanks,
-Cliff



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel menu toolbar hyperlink issues

okay.. i lied. Still doesnt work.

Its setup as a workbook open event and it doesnt run when opend by code.

"Tom Ogilvy" wrote in message ...
Auto_open macros don't run when you open a workbook through code.

You need to put you auto_open code in the workbook_open event which will
run.

--
Regards,
Tom Ogilvy


"Cliff" wrote in message
om...
So I have an hyperlink to an excel file in the tool bar and I created
and auto_open macro to read a temporary csv I need retreive and format
data from. When I go to the directory and open the excel it work
flawlessly but when I run it as a menubar hyperlink to a file it
doesnt run the macro. Its Excel 2000. and the Excel file I'm opening
hides iteslf and then opens and formats the temporary CSV file for
display.

any thoughts on why it opens diffrently each way and how I can work
around this?

thanks,
-Cliff

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel menu toolbar hyperlink issues

the workbook_open event has to be in the Thisworkbook module.

You get to this by going to the project explorer, in the vbe, find you
project and double click on thisworkbook entry under you project.

In the left dropdown at the top of the module, select Workbook, from the
right dropdown, select Open.
this will put in a procedure declaration like

Private Sub Workbook_Open()

End Sub

put any code you want to run either in between those lines or call an
existing procedure from there.

this is not an application level event - it is a workbook level event.

you can also look at Chip Pearson's page on events

http://www.cpearson.com/excel/event.htm

--
Regards,
Tom Ogilvy

"Cliff" wrote in message
om...
okay.. i lied. Still doesnt work.

Its setup as a workbook open event and it doesnt run when opend by code.

"Tom Ogilvy" wrote in message

...
Auto_open macros don't run when you open a workbook through code.

You need to put you auto_open code in the workbook_open event which will
run.

--
Regards,
Tom Ogilvy


"Cliff" wrote in message
om...
So I have an hyperlink to an excel file in the tool bar and I created
and auto_open macro to read a temporary csv I need retreive and format
data from. When I go to the directory and open the excel it work
flawlessly but when I run it as a menubar hyperlink to a file it
doesnt run the macro. Its Excel 2000. and the Excel file I'm opening
hides iteslf and then opens and formats the temporary CSV file for
display.

any thoughts on why it opens diffrently each way and how I can work
around this?

thanks,
-Cliff



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
Cannot view the menu or toolbar in Excel Menu Toolbars Excel Discussion (Misc queries) 2 June 19th 06 06:31 AM
Excel worksheet Menu Toolbar Mikey Excel Worksheet Functions 5 May 23rd 06 06:36 PM
How to deploy custome toolbar/Menu commands in Excel? Hiten Excel Worksheet Functions 3 May 13th 05 07:41 PM
Setting Excel toolbar or menu icon in C# WITHOUT using builtin icons Aaron Queenan Excel Programming 3 October 30th 03 03:55 PM
Adding toolbar/menu command to Excel using C# Aaron Queenan Excel Programming 0 October 29th 03 07:32 PM


All times are GMT +1. The time now is 05:01 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"