+ Reply to Thread
Results 1 to 4 of 4

msgbox

  1. #1
    James Coughlan
    Guest

    msgbox

    Hi,
    I am trying to set up a msgbox when opening a file. I am using the following
    code:

    Private Sub Workbook_Open()
    MsgBox "Don't forget to Update!"
    End Sub

    However it's not showing a msgbox even though it is telling me that macro's
    have been installed.
    Please help. Many thanks

  2. #2
    Paul B
    Guest

    Re: msgbox

    James, do you have it in the thisworkbook module?

    To put in this macro, from your workbook right-click the workbook's icon and
    pick View Code. This icon is to the left of the "File" menu this will open
    the VBA editor, in Project Explorer double click on thisworkbook, under your
    workbook name, if you don't see it press CTRL + r to open the Project
    Explorer, then paste the code in the window that opens on the right hand
    side, press Alt and Q to close this window and go back to your workbook, now
    this will run every time you open the workbook. If you are using excel 2000
    or newer you may have to change the macro security settings to get the macro
    to run. To change the security settings go to tools, macro, security,
    security level and set it to medium
    --
    Paul B
    Always backup your data before trying something new
    Please post any response to the newsgroups so others can benefit from it
    Feedback on answers is always appreciated!
    Using Excel 2002 & 2003


    "James Coughlan" <James [email protected]> wrote in message
    news:[email protected]...
    > Hi,
    > I am trying to set up a msgbox when opening a file. I am using the
    > following
    > code:
    >
    > Private Sub Workbook_Open()
    > MsgBox "Don't forget to Update!"
    > End Sub
    >
    > However it's not showing a msgbox even though it is telling me that
    > macro's
    > have been installed.
    > Please help. Many thanks




  3. #3
    Don Guillett
    Guest

    Re: msgbox

    And you put this code, where?

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "James Coughlan" <James [email protected]> wrote in message
    news:[email protected]...
    > Hi,
    > I am trying to set up a msgbox when opening a file. I am using the
    > following
    > code:
    >
    > Private Sub Workbook_Open()
    > MsgBox "Don't forget to Update!"
    > End Sub
    >
    > However it's not showing a msgbox even though it is telling me that
    > macro's
    > have been installed.
    > Please help. Many thanks




  4. #4
    James Coughlan
    Guest

    Re: msgbox

    Gentlemen, Thanks to you both for your quick replies. Yes, the location was
    the problem!
    Thanks again,
    James

    "Paul B" wrote:

    > James, do you have it in the thisworkbook module?
    >
    > To put in this macro, from your workbook right-click the workbook's icon and
    > pick View Code. This icon is to the left of the "File" menu this will open
    > the VBA editor, in Project Explorer double click on thisworkbook, under your
    > workbook name, if you don't see it press CTRL + r to open the Project
    > Explorer, then paste the code in the window that opens on the right hand
    > side, press Alt and Q to close this window and go back to your workbook, now
    > this will run every time you open the workbook. If you are using excel 2000
    > or newer you may have to change the macro security settings to get the macro
    > to run. To change the security settings go to tools, macro, security,
    > security level and set it to medium
    > --
    > Paul B
    > Always backup your data before trying something new
    > Please post any response to the newsgroups so others can benefit from it
    > Feedback on answers is always appreciated!
    > Using Excel 2002 & 2003
    >
    >
    > "James Coughlan" <James [email protected]> wrote in message
    > news:[email protected]...
    > > Hi,
    > > I am trying to set up a msgbox when opening a file. I am using the
    > > following
    > > code:
    > >
    > > Private Sub Workbook_Open()
    > > MsgBox "Don't forget to Update!"
    > > End Sub
    > >
    > > However it's not showing a msgbox even though it is telling me that
    > > macro's
    > > have been installed.
    > > Please help. Many thanks

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1