Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that saves Excel worksheet with value in C4 as the file name
Hi
I have been asked to create an Excel invoice form and I want to create macro that saves the worksheet. I want the macro to use the value in C4 (invoice number) as the name for the Excel invoice. I hope someone can help me with this. best regards, Benedikt F. Iceland Seafood Int. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that saves Excel worksheet with value in C4 as the file name
"Benedikt F" schreef in bericht ... Hi I have been asked to create an Excel invoice form and I want to create macro that saves the worksheet. I want the macro to use the value in C4 (invoice number) as the name for the Excel invoice. I hope someone can help me with this. best regards, Benedikt F. Iceland Seafood Int. Public Sub SaveAsC4() ThisWorkbook.SaveAs Cells(4, 3).Value End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that saves Excel worksheet with value in C4 as the file name
Sub SaveThisAMSheet()
Set ThisBook = Workbooks("dailyinterest2.xlw").Sheets("menu").Act ivate Workbooks("dailyinterest2.xlw").Sheets("amtest.xls ").Activate Investsheet.Value = "" ChDir "c:\my documents\excel\dailyinterest2\contract" Set GetTheSheet = Range("d4") Sheets("amtest.xls").Select Sheets("amtest.xls").Copy With ActiveWorkbook .Title = "Contract Number " & Range("d4") .Subject = "Last payment was made " & Range("b436") .Author = "" .Keywords = "Payer is " & Range("d5") & ". Investor is " & Range("d6") & "." .Comments = "Loan is $" & Format(Range("d8"), "#,###.00") & " at " & Format(Range("d11"), "0.00%") & " for " & Range("d9") & " months." & Chr(13) & "The Investor's yeild is " & Format(Range("j4"), "0.00%") & "." & Chr(13) & " Balloon is $" & Format(Range("g12"), "#,###.00") & "." & "The Total Accrued is $" & Format(Range("f436"), "#,###.00") End With Range("t1") = "contract" ActiveWorkbook.SaveCopyAs GetTheSheet & ".xls" ActiveWindow.Close saveChanges:=False 'ThisBook.Activate End Sub "Benedikt F" wrote: Hi I have been asked to create an Excel invoice form and I want to create macro that saves the worksheet. I want the macro to use the value in C4 (invoice number) as the name for the Excel invoice. I hope someone can help me with this. best regards, Benedikt F. Iceland Seafood Int. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using ~ as a delimiter for Excel file saves | Excel Discussion (Misc queries) | |||
Recorded macro opens, converts comma-del file and saves | Excel Programming | |||
excel file saves | Excel Discussion (Misc queries) | |||
Need add-in that saves worksheet as PDF file | Excel Programming | |||
Can I run a macro/program when Excel saves worksheet? | Excel Programming |