Using user input as the file name I want to save the worksheet as under the one direc

  • Thread starter Thread starter suee
  • Start date Start date
S

suee

Hi,

I want to create a input box where the number the user enters is th
filename I want to save the work sheet as. So when the user clicks o
ok, it'll save the number entered by the user as the filename. Clickin
on cancel will close the input box.
so far i have this:


Dim varInput As Integer

varInput = InputBox("Enter new customer quote number"
"Customer Quote Number")
Sheets("CALCULATOR").Range("A1").Value = varInput

End Sub

Any help would b much appreciated
Sue
 
Do this
Function NmFile(
X = InputBox("YourText"
If X = "" Then Exit Functio
ActiveWorkbook.SaveAs Filename:=
End Functio

you might want to test to make sure the value is numeric first though using: if isnumeric(X

----- suee > wrote: ----

Hi

I want to create a input box where the number the user enters is th
filename I want to save the work sheet as. So when the user clicks o
ok, it'll save the number entered by the user as the filename. Clickin
on cancel will close the input box
so far i have this


Dim varInput As Intege

varInput = InputBox("Enter new customer quote number"
"Customer Quote Number"
Sheets("CALCULATOR").Range("A1").Value = varInpu

End Su

Any help would b much appreciate
Sue
 
Back
Top