VB6 Excel 97 code no longer works if Win2K SP3/4 applied.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My code worked great with SP2 and now does not work correctly. Get error
"method 'Visible' of object 'Application' failed" when trying to set the
workbook visible to false. Again, worked fine in SP2. I saw a fix on this,
but cant remember exactly what is was or where is was. Had something to do
with remove a specific hotfix, or replacing a dll with prev vers. Please
dont message me to upgrade the product (275 per lic @ 130 lic, my company
cannot afford!).
 
You may want to post your code and indicate the offending line of code.
 
Here is where it fails.

set objExcel = new Excel.Application
objExcel.visible = false <--- Here is where the error occurs.

This worked fine before SP3 or SP4 for Win2K was applied. No problems at
all (it is a very simple piece of code). I have tried using late binding as
well (this part worked in late binding). Some things work in late binding
that dont work in early and vice-versa. EVERYTHING works in early binding
w/o SP3/4. The reason SP3/4 need applied is for MS security flaws that are
updated in these service packs (its a total catch 22).

Tim R
 
Boy, that doesn't look like anything that should cause trouble.

But I don't use xl97/win2k. Maybe someone who has your configuration can try to
test it to help find a solution.



Tim said:
Here is where it fails.

set objExcel = new Excel.Application
objExcel.visible = false <--- Here is where the error occurs.

This worked fine before SP3 or SP4 for Win2K was applied. No problems at
all (it is a very simple piece of code). I have tried using late binding as
well (this part worked in late binding). Some things work in late binding
that dont work in early and vice-versa. EVERYTHING works in early binding
w/o SP3/4. The reason SP3/4 need applied is for MS security flaws that are
updated in these service packs (its a total catch 22).

Tim R
 
Dave Peterson said:
Boy, that doesn't look like anything that should cause trouble.

But I don't use xl97/win2k. Maybe someone who has your configuration can
try to
test it to help find a solution.

I have a client whose application still needs to be backward compatible
with Excel 97, which I'm running on a Win2K box with no other versions of
Office installed. I've never encountered any troubles automating Excel from
Excel (which this app does in several places). I'd guess this is a
machine-specific problem and you're probably going to have to reformat and
reload

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 
Tim -

This probably isn't much use globally, but when you create a new Excel.App, isn't it
hidden by default?

Also, I don't have direct knowledge of this, because I always use CreateObject. But
I think I've read that CreateObject(Excel.Application) is better than Set Obj = New
ObjClass.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Tim said:
Here is where it fails.

set objExcel = new Excel.Application
objExcel.visible = false <--- Here is where the error occurs.

This worked fine before SP3 or SP4 for Win2K was applied. No problems at
all (it is a very simple piece of code). I have tried using late binding as
well (this part worked in late binding). Some things work in late binding
that dont work in early and vice-versa. EVERYTHING works in early binding
w/o SP3/4. The reason SP3/4 need applied is for MS security flaws that are
updated in these service packs (its a total catch 22).

Tim R

:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top