rob_sheeds
Board Regular
- Joined
- Dec 9, 2010
- Messages
- 57
Hi,
Im not good with VBA but have managed to get by on googling and this forum.
Can someone help with the FileName, it needs to concatenate 3 cells, with a space in between.
Also I want to be able to call it from any workbook I open...Is having "Public Sub" the way to do this?
Thanks in advance.
Public Sub Unprotect_SaveAs()
'
' Unprotect and Save as .xls Macro
ActiveSheet.Unprotect
ActiveWorkbook.Unprotect
ThisFile = Range("C4" & " " & "C5" & " " & "D4").Value
FileDrive = "R:\EOM GL Reporting\Franchising\P&L's to be uploaded\2012\29082011"
ActiveWorkbook.SaveAs Filename:=ThisFile, FileFormat:=52
End Sub
Im not good with VBA but have managed to get by on googling and this forum.
Can someone help with the FileName, it needs to concatenate 3 cells, with a space in between.
Also I want to be able to call it from any workbook I open...Is having "Public Sub" the way to do this?
Thanks in advance.
Public Sub Unprotect_SaveAs()
'
' Unprotect and Save as .xls Macro
ActiveSheet.Unprotect
ActiveWorkbook.Unprotect
ThisFile = Range("C4" & " " & "C5" & " " & "D4").Value
FileDrive = "R:\EOM GL Reporting\Franchising\P&L's to be uploaded\2012\29082011"
ActiveWorkbook.SaveAs Filename:=ThisFile, FileFormat:=52
End Sub