Page 1 of 2 12 LastLast
Results 1 to 10 of 13

VB ScreenUpdate = False

This is a discussion on VB ScreenUpdate = False within the Excel Questions forums, part of the Question Forums category; How Can I make the Macro Run without showing all the steps on screen while it is profoerming the Macro. ...

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Posts
    139

    Default VB ScreenUpdate = False

    How Can I make the Macro Run without showing all the steps on screen while it is profoerming the Macro.

    I used the following code in the begining of the Macro but doesn't seem to work. Does Anyone have any ideas?


    Application.ScreenUpdating = False


  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,950

    Default Re: VB ScreenUpdate = False

    It should work... unless all the steps that you're doing are one a Userform. Are they ?
    Regards,

    Juan Pablo González
    http://www.juanpg.com

  3. #3
    Board Regular
    Join Date
    Apr 2002
    Posts
    139

    Default Re: VB ScreenUpdate = False

    No. They are in a Module

  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,950

    Default Re: VB ScreenUpdate = False

    Can you post the trouble code ? and what version are you using ?
    Regards,

    Juan Pablo González
    http://www.juanpg.com

  5. #5
    Board Regular
    Join Date
    Apr 2002
    Posts
    139

    Default Re: VB ScreenUpdate = False

    Ans = MsgBox("Convert SubLedger?", vbYesNo + vbQuestion, "SAP SubLedger Macro")
    If Ans = vbYes Then
    Application.ScreenUpdating = False

    ...more code
    ...more code
    ...more code

    Beep
    Beep
    Else
    Exit Sub
    End If



    End Sub

  6. #6
    Board Regular
    Join Date
    Jun 2003
    Location
    Amorica
    Posts
    165

    Default Re: VB ScreenUpdate = False

    WOW what a trip. I logged on to ask a very simular question on how to "visualy" hide the work of my macros. My boss keeps trying to inturupt procedures because he's to impatient to wait 30 seconds and thinks he needs to click everything on the screen. :x

  7. #7
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,950

    Default Re: VB ScreenUpdate = False

    You *should* always code something like

    Application.ScreenUpdating = False

    'Your code here

    Application.ScreenUpdating = True

    you didn't say what version are you using...
    Regards,

    Juan Pablo González
    http://www.juanpg.com

  8. #8
    MrExcel MVP
    Moderator
    Smitty's Avatar
    Join Date
    May 2003
    Location
    Crested Butte, CO
    Posts
    27,277

    Default Re: VB ScreenUpdate = False

    For added measure, in case what you're doing can create dialogue boxes (Save, Close, etc.), I also add Application.DisplayAlerts = False/True.

    Smitty

  9. #9
    MrExcel MVP
    Join Date
    Apr 2002
    Location
    Vancouver BC , Canada
    Posts
    6,259

    Default Re: VB ScreenUpdate = False

    HotNumbers2001 ... Could I see the entire code please

    <MARQUEE>...........Never be afraid to try something new. Remember, amateurs built the ark, professionals built the Titanic...............The easiest thing to find is fault, don't be easy !.. --Anonymous--...</marquee>

  10. #10
    MrExcel MVP
    Moderator
    Smitty's Avatar
    Join Date
    May 2003
    Location
    Crested Butte, CO
    Posts
    27,277

    Default Re: VB ScreenUpdate = False

    IZZY:
    because he's to impatient to wait 30 seconds and thinks he needs to click everything on the screen.
    Have you thought of putting in a progress indicator or a "Disable dummies" workaround? You can use some text in a UserForm that's called with the macro that says "Hey Boss, chill out you %^&$*# pinhead...I'll be done in a minute...Mess with this again and I'll melt down your hard drive if you don't give me a raise". It will stay on screen until the macro is done. Or pop up a fake tic-tac-toe game...

    I'd be happy to post the code for that for you, but e-mailing it might be easier, so you don't have to build the associated form.

    HTH,

    Smitty

Page 1 of 2 12 LastLast

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com