LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 64
Default Copy of VB code to new spreadsheet

I am saving a spreadsheet with a new name. When I run the macro in the new
spreadsheet, it automatically opens up the old spreadsheet as well as doing
the macro. It doesn't transfer me to the new spreadsheet, it just opens it
up. This is driving me crazy! Here is my VB code, if it helps. Thanks to
anyone who can help me.

Sub PRINT3SAVE()
'Sub date1()
'
' date1 Macro
' Saves date created
'
Range("U45").Select
Selection.Copy
Range("W4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("U46").Select
Selection.Copy
Range("W39").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

' PRINT3SAVE Macro
' Prints 3 copies and saves file
'
ActiveWindow.SelectedSheets.PrintOut Copies:=3
Application.Dialogs(xlDialogSaveAs).Show

End Sub
 
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
Macro to copy and append spreadsheet changes to new spreadsheet Journey Excel Discussion (Misc queries) 1 June 13th 08 04:33 PM
Code to Copy Data from One Spreadsheet To Another Rob Excel Discussion (Misc queries) 9 June 9th 07 11:03 AM
How do I copy spreadsheet data as shown to another spreadsheet? trainer07 Excel Discussion (Misc queries) 2 August 7th 06 09:39 PM
In Excel I want to copy text from spreadsheet to spreadsheet Kris Excel Worksheet Functions 3 June 9th 06 07:58 PM
Copy code to a new spreadsheet Markl Excel Discussion (Misc queries) 3 March 29th 06 03:54 PM


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