Thread
:
Save as saves selected worksheet instead of whole workbook
View Single Post
#
2
Posted to microsoft.public.excel.programming
[email protected]
external usenet poster
Posts: 11
Save as saves selected worksheet instead of whole workbook
So I changed it to ThisWorkbook.Save as and it saved my Personal.xls
file.... anyone know what to do about that?
wrote:
Hi -
I have a macro that does a save as action and saves as a name from the
values of a couple cells... and it seems to work okay. The problem is I
have 3 worksheets and it only saves the active worksheet... can anybody
help me out. It would be much appreciated.
This is what I've got
Sub SaveAs()
Dim uname
With ActiveWorkbook.Worksheets("sheet1")
uname = .Range("B2").Value & " " & _
.Range("B3").Value
End With
ActiveWorkbook.SaveAs ThisWorkbook.Name _
& " " & " " & uname & ".xls"
ActiveWorkbook.Close True
End Sub
Again, I need it to save the entire workbook to a new file and not just
the avctive worksheet.
Thanks
A
Reply With Quote
[email protected]
View Public Profile
Find all posts by
[email protected]