Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default VBE object in 2010

Hopefully someone can help!

I've been running various routines in workbooks using vb
scripts...successfully for the past 5 yrs. Just upgraded to 2010 and
various bits of code are now struggling. Admittedly my code could do
with tidying up but it's generally a bit of a head-ache.

One thingthat throws a vb script error is if the following line is
included in any of my workbook macros:

Application.VBE.MainWindow.Visible = False

.....anybody know why this is happening as it wasn't a problem in 2007?

Any help much appreciated,
J
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default VBE object in 2010

WhytheQ explained :
Hopefully someone can help!

I've been running various routines in workbooks using vb
scripts...successfully for the past 5 yrs. Just upgraded to 2010 and
various bits of code are now struggling. Admittedly my code could do
with tidying up but it's generally a bit of a head-ache.

One thingthat throws a vb script error is if the following line is
included in any of my workbook macros:

Application.VBE.MainWindow.Visible = False

....anybody know why this is happening as it wasn't a problem in 2007?

Any help much appreciated,
J


I haven't installed 2010 yet because none of my clients use it. But...

What's the error message? Is '.VBE.MainWindow' a valid object in 2010?
OR '.VBE.MainWindow.Visible' a valid property setting? If not, you may
have to modify your code so it version-aware.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default VBE object in 2010

On Jun 25, 8:03*pm, GS wrote:
WhytheQ explained :





Hopefully someone can help!


I've been running various routines in workbooks using vb
scripts...successfully for the past 5 yrs. Just upgraded to 2010 and
various bits of code are now struggling. Admittedly my code could do
with tidying up but it's generally a bit of a head-ache.


One thingthat throws a vb script error is if the following line is
included in any of my workbook macros:


Application.VBE.MainWindow.Visible = False


....anybody know why this is happening as it wasn't a problem in 2007?


Any help much appreciated,
J


I haven't installed 2010 yet because none of my clients use it. But...

What's the error message? Is '.VBE.MainWindow' a valid object in 2010?
OR '.VBE.MainWindow.Visible' a valid property setting? If not, you may
have to modify your code so it version-aware.

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc- Hide quoted text -

- Show quoted text -


Hello Garry
It is a valid object and a valid property setting in 2010 so no need
to make the code version aware.
When the .vbs file runs it fails on Line 8 (which is the reference to
the Public macro in the workbook) and the Windows Script Host error
message says:

Char: 1
Error: System call failed
Code: 80010100
Source: (null)

.....if I comment out the line that references the VBE then the vbs
file runs fine.
The VBE line of code is not vital but I've spent 3hrs tracking this
error down and was wondering if Microsoft have got a time machine and
could give me this time back please!

J
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default VBE object in 2010

WhytheQ brought next idea :
On Jun 25, 8:03*pm, GS wrote:
WhytheQ explained :





Hopefully someone can help!


I've been running various routines in workbooks using vb
scripts...successfully for the past 5 yrs. Just upgraded to 2010 and
various bits of code are now struggling. Admittedly my code could do
with tidying up but it's generally a bit of a head-ache.
One thingthat throws a vb script error is if the following line is
included in any of my workbook macros:
Application.VBE.MainWindow.Visible = False
....anybody know why this is happening as it wasn't a problem in 2007?
Any help much appreciated,
J


I haven't installed 2010 yet because none of my clients use it. But...

What's the error message? Is '.VBE.MainWindow' a valid object in 2010?
OR '.VBE.MainWindow.Visible' a valid property setting? If not, you may
have to modify your code so it version-aware.

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc- Hide quoted text -

- Show quoted text -


Hello Garry
It is a valid object and a valid property setting in 2010 so no need
to make the code version aware.
When the .vbs file runs it fails on Line 8 (which is the reference to
the Public macro in the workbook) and the Windows Script Host error
message says:

Char: 1
Error: System call failed
Code: 80010100
Source: (null)

....if I comment out the line that references the VBE then the vbs
file runs fine.
The VBE line of code is not vital but I've spent 3hrs tracking this
error down and was wondering if Microsoft have got a time machine and
could give me this time back please!

J


Ok J, I'm not sure now how to direct you because you speak to using
VBScript and not VBA. The VBE only knows VBA by default so unless you
explicitly ref objects in your VBS, you can't run .vbs in VBA modules.
<BTWVBA uses .bas, .frm, and .cls files only. Can you post the entire
code so we can see where/how the problem arises?

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert 24/03/2010 date into 03/24/2010 date format Nitesh Excel Programming 3 June 5th 10 10:44 AM
Excel 2010 Object Model alphaspark Excel Programming 0 January 29th 10 02:29 PM
Form 4 Range of time from 1/20/2010 4:00 AM To 1/21/2010 10:00 AM Peter Gonzalez[_2_] Excel Worksheet Functions 2 January 26th 10 06:58 PM
Can't open workbook in excel 64 bit 2010 - but can in excel 2010 3 Darrell[_2_] Excel Programming 0 January 12th 10 08:53 PM


All times are GMT +1. The time now is 07:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"