Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Seems to work for me. What is the actual address of Range("PONUM")?
"Jeff S." wrote: Hi, Every time run this macro to save the PO, close it, and increment the PO# on a clear sheet the saved PO shows up blank when I open it. What am I doing wrong? Here's my code: Sub CommandButton1_Click() Dim n As Range Set n = Range("PONUM") Application.CutCopyMode = False 'clears the clipboard Range("A1:G50").Select Selection.Copy Workbooks.Add ActiveSheet.Paste Destination:=Worksheets("Sheet1").Range("A1") ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\mca.JOMA-NET\Desktop\PO" & n & ".xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False ActiveWorkbook.Close Cells(10, 2).Select 'go and park at cell B10 and wait MsgBox ("Purchase Order was saved as PO" & n & ".xls") n.Value = n.Value + 1 Range("B34:B39").ClearContents ActiveWorkbook.Save End Sub Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy & Paste Issue | Excel Discussion (Misc queries) | |||
Copy Paste issue | Excel Worksheet Functions | |||
Issue with copy & paste? | Excel Discussion (Misc queries) | |||
purchase order counter in excel purchase order template | Excel Worksheet Functions | |||
I want a purchase order that includes page number (if to be order. | New Users to Excel |