Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Feb 2003
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hiding the Visual Basic Editor (Excel 2003)

    Version edited by HansV - the question is about Excel 2003, not 2000

    I have been using the following to hide the VBE. but now I find that it hangs in xl 2003, even though it seems to be in the object model on a machine I checked that was running 2003.

    Any clues why or any workaround?

    <pre>If Val(Application.Version) =>9 Then
    .VBE.MainWindow.Visible = False
    End If</pre>

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hiding the Visual Basic Editor (Excel 2003)

    Is this code within a block

    With Application
    ...
    End With

    If so, you can use .Version instead of Application.Version. If not, what does the . in .VBE refer to?

    PS What is the purpose of this code? It only closes the Visual Basic Editor, the user can still use Alt+F11 to open it again.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hiding the Visual Basic Editor (Excel 2003)

    Just my <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>,
    Watch out for the operators order....If Val(Application.Version) =>9 Then... should be >=9
    Regards,
    Rudi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •