LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Macro not saving as

The following is code that I am using for a project. I want it to save as
based on a value that is in the source spreadsheet. It is supposed to open up
another spreadsheet and then save it as that value in the source spreadsheet.
the macro is stopping at the line where it needs to name the file, then save
it. can someone help?


Sub Upload()
Application.EnableCancelKey = xlDisabled
Sheets("Upload").Select

lastRow = Range("M10000").End(xlUp).Row

Range("M" & lastRow).Offset(1, 0).Select
ActiveCell.FormulaR1C1 = "END"


Call Copy_GL


Q = Range("n1")


Call VoucherNum





Range("a1:n1000").Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste

'Application.Goto referenece:="gl_acct"
'ActiveCell.Offset(0, 1).Range("a1").Select
'ActiveCell.ClearContents
Rows("1:1").Select
Selection.Delete Shift:=xlUp

spath = "P:\Platinum\A_P IMPORT\Contractor Invoices\" & Q

ActiveWorkbook.SaveAs Filename:=[spath], _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False


ActiveWindow.Close
'windows("xxxxxxx").activate
Range("a3:m1000").ClearContents
Call name_fields









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
Saving Macro whatzzup Excel Discussion (Misc queries) 2 April 24th 08 09:22 AM
Saving a macro Bill New Users to Excel 1 July 12th 07 08:53 AM
Saving Macro - need help jmcclain Excel Programming 1 February 23rd 07 11:45 PM
Saving a spreadsheet without saving the Macro tedd13 Excel Programming 7 March 31st 06 02:17 PM
Macro for Saving!! toolroomman Excel Programming 1 February 22nd 06 09:21 PM


All times are GMT +1. The time now is 03:09 AM.

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"