Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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
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
Using ~ as a delimiter for Excel file saves woc Excel Discussion (Misc queries) 2 February 12th 09 01:14 AM
Recorded macro opens, converts comma-del file and saves Ed Excel Programming 6 September 22nd 06 08:36 PM
excel file saves Cell reference as the file name field Excel Discussion (Misc queries) 2 November 30th 05 04:31 PM
Need add-in that saves worksheet as PDF file Don Wiss Excel Programming 0 October 26th 05 07:09 PM
Can I run a macro/program when Excel saves worksheet? TerryM Excel Programming 1 October 6th 04 12:23 PM


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