ActiveWorkbook.SAVEAS for *.xls
Few points..
-- You can use pass the value direct to the argument like
Application.InputBox("SELECT",Type:=8).Text
-- You have not mentioned the error
--While generating error let me know what range have you selected
--What is the content or the cell value(s) of the range you have selected
If you can get back with the above info I can probably recreate the issue...
If this post helps click Yes
---------------
Jacob Skaria
"Jacob Skaria" wrote:
Does the below work for you...
Dim strFile as String
strFile = Application.InputBox("SELECT", , , , , , , 8).Text
If Trim(strFile) < "" Then
ActiveWorkbook.SAVEAS "D:\New Folder\" & strFile & ".xls",
FileFormat:=xlNormal
End If
If this post helps click Yes
---------------
Jacob Skaria
"Faraz A. Qureshi" wrote:
Sorry Jacob,
But again the error/failure message of Runtime error pops up. Sure would
have used a String but it is the cell values on multiple sheets I want to
use, instead of copying, inserting a new name and saving each sheet
separately.
--
Best Regards,
Faraz
"Jacob Skaria" wrote:
Try
ActiveWorkbook.SAVEAS "D:\New Folder\" & _
Application.InputBox("SELECT", , , , , , , 8).Text & ".xls", _
FileFormat:=xlExcel9795
I would rather assign the string to a variable and then use the variable in
save as.
If this post helps click Yes
---------------
Jacob Skaria
"Faraz A. Qureshi" wrote:
I want to save a file in the 2003 version in the name of value of a cell.
What might be wrong with:
Sub SAVEAS()
ActiveWorkbook.SAVEAS "D:\New Folder\" & _
Range(Application.InputBox("SELECT", , , , , , , 8)).Text & ".xls", _
FileFormat:=xlExcel9795
End Sub
Your comments and guidance shall be appreciated.
--
Best Regards,
Faraz
|