msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VB 6 - Run-time error 1004 when saving excel file in MS Offi

 
Post new topic   Reply to topic    msvisual.com Forum Index -> DirectX
Author Message
High_Hopes



Joined: 23 Jan 2008
Posts: 1

PostPosted: Wed Jan 23, 2008 1:43 pm    Post subject: VB 6 - Run-time error 1004 when saving excel file in MS Offi Reply with quote

Installed VB 6.0 application on user's PC which has MS Office 2007. In VB,
I'm trying to produce an Excel file using xlExcel9795. When it gets to this
line "**" in the code (see below), I get the following error...
Run-time error '1004'
Method '~' of object '~' failed

Is there another format I should be using? ...or... do I need to set
something in Excel 2007 so it works?

If OpenExcel = True Then
With xlApp
.ActiveWindow.ScrollColumn = 1
.Cells.Select
.Selection.Columns.AutoFit
.Range("A1").Select
strMsg = "(5) After Last Column/Row! "
** .ActiveWorkbook.SaveAs FileName:=strYEApath,
FileFormat:=xlExcel9795, CreateBackup:=False
End With

TIA,

Archived from group: microsoft>public>vb>directx
Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
2003 Excel Spreadsheet with a VBN file wont run with Excel 2 i have a spreadsheet the i've used for many years which auto login to 8 different sites automatically buy putting my username and pass word into a browser window so that i dont have to manually enter the username and password and than download the informa

Runtime error when trying to save Excel 2000 worksheet from I have a VB 6.0 application that creates reports using Excel 2000. The application has been working fine but recently I installed it on a new hard drive (same and now I get a run time error every time I try to save the excel report. The e

Excel VBA File Search and scheduled task Hi I have a macro to unzip the file in a directory. The macro will check whether the zip file has already been unzipped. If not, the macro will check whether the zip file is in the directory. If the zip file is not available, the macro will stop, other

Saving a mesh Let's say I got a DX standard Mesh, like a Box, Torus or Sphere, created with CreateTorus or CreateSphere. I named the resulting Mesh object "Torus" Now I want to save this to a .X file. I tried to use the following: (The Torus has not changed since it wa

Mesh saving!! I have loaded a 3d model on a canvas, using an ocx. I am very interesed if it is possible to save this 3d model in a .x file, and if it's possible how do I do that! Thanks. Aurelian FEJER
Post new topic   Reply to topic    msvisual.com Forum Index -> DirectX All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group