Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Before Save Event

  1. #11
    Board Regular
    Join Date
    Feb 2002
    Location
    Las Vegas Nevada USA
    Posts
    239
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks to TsTom, Dreamboat and Dave Hawley for your kind responses. Here is the final code. It reminds the user not to step on the template.
    "I get by with a little help from my friends"

    Private Sub Workbook_Open()
    Dim wBook As Workbook
    Dim Response As Integer
    'Test for template name. Exit if it has been changed.
    Set wBook = ActiveWorkbook
    If wBook.Name <> "Nevada Estimating 5.0.xls" Then
    Exit Sub
    End If
    'Display splash screen reminder to enter new job into the log.
    UserForm1.Show
    'Remind user to save it as a new job.
    Response = MsgBox(prompt:="PLEASE SAVE THE FILE TO A NEW NAME.", _
    Buttons:=vbOKCancel + vbExclamation, Title:="REMINDER")
    'Bring up the Save As screen.
    If Response = vbOK Then
    Application.Dialogs(xlDialogSaveAs).Show ("*.xls")
    End If
    End Sub

    Have a great day
    George

  2. #12
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    George, I think Dreamboat is the real man in this help.

    Sorry I just couldn't resist ;o)

Some videos you may like

User Tag List

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
  •