View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
LivingIn32751 LivingIn32751 is offline
external usenet poster
 
Posts: 2
Default Passing contents of a cell to a macro

I am creating a worksheet model which will be used repetitively. I have the
macro to start the new worksheet and pre-fill some of the cells. After
manually completing the rest of the information on the worksheet, I want to
run a macro which will save that worksheet to a filename that exists in one
of the cells.

Here is the SaveAs Filename macro:

ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\myusername\My Documents\filename.xls",
FileFormat:=xlNormal _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False

I want to be able to replace "filename" with the value in cell A5 for
instance.

How can I do this?

Thank you.
Learning In Florida