create a macro to automaticaly name a file.
I meant what was in B9 when the code failed?
msgbox "***" & activesheet.range("b9").value & "***"
would show you the value surrounded by asterisks.
BH wrote:
B9 will be a field that is entered by the user it will contain text,or
numerical values.
"Dave Peterson" wrote:
What's in B9?
There are some characters that can't be used in file names (like *, /, \).
(Make sure you're looking at the correct sheet, too. Maybe the wrong sheet is
active.)
BH wrote:
ActiveWorkbook.SaveAs sPath & Activesheet.Range("B9").Value
"Dave Peterson" wrote:
You may want to post the code that's failing (don't attach the workbook).
BH wrote:
All I am trying to do is place a command button on a form that will name the
file from a cell and save the file under that name , I have not had any luck
so far. I may not be seeting up the macro the right way.
--
Dave Peterson
--
Dave Peterson
|