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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automation Excel SaveAs Error

Status
Not open for further replies.

MJPPaba

MIS
May 28, 2003
142
GB
Please help, I am opening Excel from Access and need to resave the file with another name. Problem is not seeming to work at the moment.

Please advise...

Pabs


Public Sub mdl_OpenSS(myDir As String, myFile As String, myProcessID As Integer)
Dim myCurDir As String
On Error GoTo myError

'need to change the name of the file to pollerworking.xls
Set myXL = GetObject(myDir & myFile)

With myXL

.Application.Visible = True

.Windows(myFile).Visible = True

.Workbooks(myFile).SaveAs Filename:= _
"C:\working.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top