View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Corey Corey is offline
external usenet poster
 
Posts: 276
Default Application.Dialogs(xlDialogSaveAs) = res ???

res = InputBox("Enter a file name ? ", "Company Name here..")
If res = "" Then Exit Sub
ThisWorkbook.Save
With ActiveWorkbook
Worksheets(Array("A", "1")).Copy
Application.Dialogs(xlDialogSaveAs) = res <========= Error here
End With
End Sub


I get an error in the above.
How do i set res to be the new file name ?

Corey....