Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert 24/03/2010 date into 03/24/2010 date format | Excel Programming | |||
Excel 2010 Object Model | Excel Programming | |||
Form 4 Range of time from 1/20/2010 4:00 AM To 1/21/2010 10:00 AM | Excel Worksheet Functions | |||
Can't open workbook in excel 64 bit 2010 - but can in excel 2010 3 | Excel Programming |