E
Elby
Hi,
I'm trying to set a variable as a filename, and keep getting a compile
error "Object required." - it selects my variable "Newfilename =" when
this happens
Here's a snip:
Sub Namefile()
Const Dirpath As String = "C:\WINNT\Profiles\elby\Desktop\"
Dim newfilename As String
Set newfilename = Dirpath & format((Date - 1), "mmm-dd-yy") & "_Pres"
& ".xls"
End sub
I'm working in VBA - Excel 97, new at this.
Any ideas much appreciated!
I'm trying to set a variable as a filename, and keep getting a compile
error "Object required." - it selects my variable "Newfilename =" when
this happens
Here's a snip:
Sub Namefile()
Const Dirpath As String = "C:\WINNT\Profiles\elby\Desktop\"
Dim newfilename As String
Set newfilename = Dirpath & format((Date - 1), "mmm-dd-yy") & "_Pres"
& ".xls"
End sub
I'm working in VBA - Excel 97, new at this.
Any ideas much appreciated!