View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default msg Box Value to be Saved File Name ??

Corey,
I guess you have to answer the user a question:
res = InputBox("What is the name of the file ?", "Company Name ....")
ThisWorkbook.SaveAs res
- with error handling added
But you also pop up the SaveAs dialog, that's its purpose:
Application.dialogs(xlDialogsaveAs).show

NickHK

"Corey" wrote in message
...
It the below msg box i want the value that is entered INTO the msg box to
NAME the file to Save. (eg. File 10)

Sub Macro20()
Range("A4").Select
Selection.ClearContents

res = InputBox("The MAXIMUM number of Sheets have been reached,
This is a NEW COPY of the WorkBook.", "Company Name ....")

If res = "" Then Exit Sub
ActiveWindow.DisplayWorkbookTabs = False
With ActiveWindow
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
End With

End Sub



What step needs to added to madify this so it will name it this?

Corey....