none
VBA code in Access 2007 RRS feed

  • Question

  • I've recently upgraded to Windows Vista, MS Office 2007. I am trying to write a program but running into troubles with the VBA code. Regardless of the database, or the code that I use, when I put it in as VBA, it doesn't run. When I use macros it works.

    For example, if I create a button to exit the application, which the system auto codes for me as a macro which works. If I then convert to vb code, it doesn't work anymore.

    I have setup a quick bit of code to see if it even goes to the vb code, but it never does. The code I've setup is similar to:

    sub form_load()
         msgbox "Hello", vbOKOnly, "Hello"
    end sub

    this should run regardless of anything else in the program, but doesn't.

    Any help that can be offered would be greatly appreciated. Thank you in advance for the help.
    • Moved by Yichun Feng Wednesday, March 25, 2009 10:52 AM about VBA (Moved from Visual Basic General to Off-Topic Posts (Do Not Post Here))
    Monday, March 23, 2009 8:49 PM

All replies

  • WhiteheadJ said:

    I've recently upgraded to Windows Vista, MS Office 2007. I am trying to write a program but running into troubles with the VBA code. Regardless of the database, or the code that I use, when I put it in as VBA, it doesn't run. When I use macros it works.

    For example, if I create a button to exit the application, which the system auto codes for me as a macro which works. If I then convert to vb code, it doesn't work anymore.



    Hi,

    Please see this thread for a link to the VBA forum.>>

    http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/c147bae1-c9db-4ae8-9557-43713004cc94

    or use.>>

    http://www.programmersheaven.com/mb/vba/Board.aspx


    Regards,

    John

    Monday, March 23, 2009 9:20 PM
  • Thank you for guiding me to the correct location.
    Tuesday, March 24, 2009 12:23 PM