Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

objWkb.AveAs with changing dates

Status
Not open for further replies.

KatGraham

Programmer
Feb 12, 2003
58
US
How do I save the worksheet with a name that is listed on a form?

For example:

The name will always be: Claim.xls

But the first part will change ie.
01.2004Claim.xls (for January)
02.2004Claim.xls (for February)
etc.

The 01.2004 part will be a field in a form.

HELP?
 
Kat,


You'll need to concatenate the name to be what you want.

For example create test textbox that would have it's control source set as follows -

Me.XLSFilename.Value=Me.[DateField]&"Claim.xls"


Hope this helps you.


Steve
 
I tried:

Dim FileName As String
FileName = Forms!frmMainMenu!dtmFile & ".Claims.xls"

objWkb.SaveAs "c:\My Data\FileName"

Is this the same thing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top