• RetiredGeek

    RetiredGeek

    @retiredgeek

    Viewing 15 replies - 10,036 through 10,050 (of 10,060 total)
    Author
    Replies
    • in reply to: Creating a timed message box with no buttons #1204782

      This seems like such a handy thing that I tried it in Word 2007 and I cannot get it to work. I changed names slightly, checked program Help which suggested including the full path to the macro, used the When and Name labels, did not include the lblMessage.Caption to make it simpler. No error message. The form displays and never closes.

      Code:
      Sub TestTimedMessage()
        Application.OnTime When:=Now + TimeValue("00:00:05"), Name:="Normal.TestMacros.UnloadTimedDialog"
        frmTimedDialog.Show
      End Sub
      
      Sub UnloadTimedDialog()
        frmTimedDialog.Hide
      End Sub

      What am I missing? Security is wide open.
      Thanks, Kim

      I tried it in Word and also ran into problems.
      1. Make sure it’s in a module not ThisDocument
      2. Change the form’s behavior to ShowModal = False (this makes it work!)

      I looked for the ShowModal property in the Object browser but could not find it so
      you’ll have to set it when you design the form vs at runtime.

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • in reply to: Creating a timed message box with no buttons #1198481

      I had a little trouble getting this to work…of course it was because I put the message display BEFORE the timer…duh!

      Here’s my example code:

      Code:
      Sub Testit()
      
        ufMessageBoard.lblMessage.Caption = "Testing timed message"
        
        'Application.OnTime Now + TimeValue("00:00:03"), "UnloadMessageBoard"  'This works also
        Application.OnTime DateAdd("s", 3, Now), "UnloadMessageBoard"
        
        ufMessageBoard.Show
        
      End Sub
      
      Sub UnloadMessageBoard()
      
         ufMessageBoard.Hide
         
      End Sub
      

      ufMessageBoard is just an Excel form with a single label field.
      I used a label field because it won’t appear like a text field
      which may be inviting the user to enter something.

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • in reply to: Creating a timed message box with no buttons #1199706

      I had a little trouble getting this to work…of course it was because I put the message display BEFORE the timer…duh!

      Here’s my example code:

      Code:
      Sub Testit()
      
        ufMessageBoard.lblMessage.Caption = "Testing timed message"
        
        'Application.OnTime Now + TimeValue("00:00:03"), "UnloadMessageBoard"  'This works also
        Application.OnTime DateAdd("s", 3, Now), "UnloadMessageBoard"
        
        ufMessageBoard.Show
        
      End Sub
      
      Sub UnloadMessageBoard()
      
         ufMessageBoard.Hide
         
      End Sub
      

      ufMessageBoard is just an Excel form with a single label field.
      I used a label field because it won’t appear like a text field
      which may be inviting the user to enter something.

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • in reply to: Creating a timed message box with no buttons #1200078

      I had a little trouble getting this to work…of course it was because I put the message display BEFORE the timer…duh!

      Here’s my example code:

      Code:
      Sub Testit()
      
        ufMessageBoard.lblMessage.Caption = "Testing timed message"
        
        'Application.OnTime Now + TimeValue("00:00:03"), "UnloadMessageBoard"  'This works also
        Application.OnTime DateAdd("s", 3, Now), "UnloadMessageBoard"
        
        ufMessageBoard.Show
        
      End Sub
      
      Sub UnloadMessageBoard()
      
         ufMessageBoard.Hide
         
      End Sub
      

      ufMessageBoard is just an Excel form with a single label field.
      I used a label field because it won’t appear like a text field
      which may be inviting the user to enter something.

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • in reply to: Creating a timed message box with no buttons #1200805

      I had a little trouble getting this to work…of course it was because I put the message display BEFORE the timer…duh!

      Here’s my example code:

      Code:
      Sub Testit()
      
        ufMessageBoard.lblMessage.Caption = "Testing timed message"
        
        'Application.OnTime Now + TimeValue("00:00:03"), "UnloadMessageBoard"  'This works also
        Application.OnTime DateAdd("s", 3, Now), "UnloadMessageBoard"
        
        ufMessageBoard.Show
        
      End Sub
      
      Sub UnloadMessageBoard()
      
         ufMessageBoard.Hide
         
      End Sub
      

      ufMessageBoard is just an Excel form with a single label field.
      I used a label field because it won’t appear like a text field
      which may be inviting the user to enter something.

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • in reply to: Creating a timed message box with no buttons #1201724

      I had a little trouble getting this to work…of course it was because I put the message display BEFORE the timer…duh!

      Here’s my example code:

      Code:
      Sub Testit()
      
        ufMessageBoard.lblMessage.Caption = "Testing timed message"
        
        'Application.OnTime Now + TimeValue("00:00:03"), "UnloadMessageBoard"  'This works also
        Application.OnTime DateAdd("s", 3, Now), "UnloadMessageBoard"
        
        ufMessageBoard.Show
        
      End Sub
      
      Sub UnloadMessageBoard()
      
         ufMessageBoard.Hide
         
      End Sub
      

      ufMessageBoard is just an Excel form with a single label field.
      I used a label field because it won’t appear like a text field
      which may be inviting the user to enter something.

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • in reply to: Creating a timed message box with no buttons #1202495

      I had a little trouble getting this to work…of course it was because I put the message display BEFORE the timer…duh!

      Here’s my example code:

      Code:
      Sub Testit()
      
        ufMessageBoard.lblMessage.Caption = "Testing timed message"
        
        'Application.OnTime Now + TimeValue("00:00:03"), "UnloadMessageBoard"  'This works also
        Application.OnTime DateAdd("s", 3, Now), "UnloadMessageBoard"
        
        ufMessageBoard.Show
        
      End Sub
      
      Sub UnloadMessageBoard()
      
         ufMessageBoard.Hide
         
      End Sub
      

      ufMessageBoard is just an Excel form with a single label field.
      I used a label field because it won’t appear like a text field
      which may be inviting the user to enter something.

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • in reply to: Creating a timed message box with no buttons #1203404

      I had a little trouble getting this to work…of course it was because I put the message display BEFORE the timer…duh!

      Here’s my example code:

      Code:
      Sub Testit()
      
        ufMessageBoard.lblMessage.Caption = "Testing timed message"
        
        'Application.OnTime Now + TimeValue("00:00:03"), "UnloadMessageBoard"  'This works also
        Application.OnTime DateAdd("s", 3, Now), "UnloadMessageBoard"
        
        ufMessageBoard.Show
        
      End Sub
      
      Sub UnloadMessageBoard()
      
         ufMessageBoard.Hide
         
      End Sub
      

      ufMessageBoard is just an Excel form with a single label field.
      I used a label field because it won’t appear like a text field
      which may be inviting the user to enter something.

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • in reply to: Creating a timed message box with no buttons #1204239

      I had a little trouble getting this to work…of course it was because I put the message display BEFORE the timer…duh!

      Here’s my example code:

      Code:
      Sub Testit()
      
        ufMessageBoard.lblMessage.Caption = "Testing timed message"
        
        'Application.OnTime Now + TimeValue("00:00:03"), "UnloadMessageBoard"  'This works also
        Application.OnTime DateAdd("s", 3, Now), "UnloadMessageBoard"
        
        ufMessageBoard.Show
        
      End Sub
      
      Sub UnloadMessageBoard()
      
         ufMessageBoard.Hide
         
      End Sub
      

      ufMessageBoard is just an Excel form with a single label field.
      I used a label field because it won’t appear like a text field
      which may be inviting the user to enter something.

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • in reply to: Disabling macros when opening workbook from VB #1199686

      I just ran a quick test to refresh my memory and Auto_Open macros do Not run when the workbook is
      opened by Workbook.open.

      Do you have some other types of auto execute macros, perhaps triggered by an event?

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • in reply to: Disabling macros when opening workbook from VB #1200069

      I just ran a quick test to refresh my memory and Auto_Open macros do Not run when the workbook is
      opened by Workbook.open.

      Do you have some other types of auto execute macros, perhaps triggered by an event?

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • in reply to: Disabling macros when opening workbook from VB #1200796

      I just ran a quick test to refresh my memory and Auto_Open macros do Not run when the workbook is
      opened by Workbook.open.

      Do you have some other types of auto execute macros, perhaps triggered by an event?

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • in reply to: Disabling macros when opening workbook from VB #1201715

      I just ran a quick test to refresh my memory and Auto_Open macros do Not run when the workbook is
      opened by Workbook.open.

      Do you have some other types of auto execute macros, perhaps triggered by an event?

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • in reply to: Disabling macros when opening workbook from VB #1202486

      I just ran a quick test to refresh my memory and Auto_Open macros do Not run when the workbook is
      opened by Workbook.open.

      Do you have some other types of auto execute macros, perhaps triggered by an event?

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • in reply to: Disabling macros when opening workbook from VB #1203395

      I just ran a quick test to refresh my memory and Auto_Open macros do Not run when the workbook is
      opened by Workbook.open.

      Do you have some other types of auto execute macros, perhaps triggered by an event?

      RG

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    Viewing 15 replies - 10,036 through 10,050 (of 10,060 total)