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

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top