Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default Change the start of a workbook

Hi!!
I have this
Private Sub Workbook_open()
copy
GetData_Example1
Priser.Show
End Sub

Now i save my file as a new file
and when i do that i don't want to have
"copy" and "GetData_Example1" in the
new workbook
So in my new workbook there shall only stay
Private Sub Workbook_open()
Priser.Show
End Sub

Hope someone can help maybe with a macro there
can delete the lines i havn't use for

Best regards alvin

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Change the start of a workbook

"Alvin Hansen" wrote in message
...
Hi!!
I have this
Private Sub Workbook_open()
copy
GetData_Example1
Priser.Show
End Sub

Now i save my file as a new file
and when i do that i don't want to have
"copy" and "GetData_Example1" in the
new workbook
So in my new workbook there shall only stay
Private Sub Workbook_open()
Priser.Show
End Sub

Hope someone can help maybe with a macro there
can delete the lines i havn't use for

Best regards alvin


Try this

Private Sub Workbook_open()
If ActiveWorkbook.Name = "Original File.xls" Then
copy
GetData_Example1
Else
End If
Priser.Show
End Sub

Ian


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 209
Default Change the start of a workbook

Yes yes yes
Thanks
alvin


"IC" skrev:

"Alvin Hansen" wrote in message
...
Hi!!
I have this
Private Sub Workbook_open()
copy
GetData_Example1
Priser.Show
End Sub

Now i save my file as a new file
and when i do that i don't want to have
"copy" and "GetData_Example1" in the
new workbook
So in my new workbook there shall only stay
Private Sub Workbook_open()
Priser.Show
End Sub

Hope someone can help maybe with a macro there
can delete the lines i havn't use for

Best regards alvin


Try this

Private Sub Workbook_open()
If ActiveWorkbook.Name = "Original File.xls" Then
copy
GetData_Example1
Else
End If
Priser.Show
End Sub

Ian



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
Can you change a horizontal bar chart to start at the right TJW Charts and Charting in Excel 1 February 26th 10 02:39 AM
Start up workbook RPB Setting up and Configuration of Excel 2 September 10th 09 06:00 PM
To change the application to start if i run a hyperlink Giuseppe Morgese Excel Worksheet Functions 1 November 6th 07 05:35 PM
Excel workbook is corrupted, workbook automatically saves on start Paul Gooda Excel Discussion (Misc queries) 3 September 28th 06 04:51 PM
Start macro on cell change Giorgio[_2_] Excel Programming 4 December 17th 03 06:48 PM


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