Consulting

Results 1 to 3 of 3

Thread: Keep Validation Input Message on screen when first open workbook (12-20-09)

  1. #1

    Keep Validation Input Message on screen when first open workbook (12-20-09)

    I have a workbook with multiple worksheets and multiple vba modules.
    When I first open the workbook, I want to use the validation input message for the opening active cell as a user instruction (i.e. exactly what to do first).

    The problem is that when I first open the workbook the validation input message is visible for a second or two, but then disappears. If I then manually ‘reselect’ that cell, the validation input message does reappear.

    How can I keep the validation input message visible on the screen when I first open the workbook??

    I am using subroutine Events (e.g. Workbook_Open, Worksheet_Activate, Worksheet_Change, Worksheet_SelectionChange); I am using commands (i.e. Application.DisplayAlerts = Yes/No, Application.Enable Events = True/False); and I am using Protection with a password. I can send code if necessary.

    Thanks very much for any help or suggestions.
    Steve

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    You could do this a couple of ways that I see using vba. One way would be to use a workbook open event to select the cell with validation when the workbook opens:

    Put this in the thisworkbook module:
    [vba]Private Sub Workbook_Open()
    Sheets("Sheet1").Range("D4").Select
    End Sub[/vba]
    Where D4 on Sheet 1 is the cell with validation.
    See attached for example
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Or you could use a simple userform that pops up when the workbook opens with instructions. It could even be on a timer to close after so many seconds.
    Put this in the workbook open module:
    [VBA]Private Sub Workbook_Open()
    UserForm1.Show
    End Sub
    [/VBA]

    put this in the code module for the userform:
    [VBA]Private Sub UserForm_Initialize()
    Application.OnTime Now + TimeValue("00:00:05"), "KillForm"
    End Sub[/VBA]

    and put this in a standard module:
    [VBA]Sub KillForm()
    Unload UserForm1
    End Sub[/VBA]

    See attached.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

Posting Permissions

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