curiouswebster
asked on
Why is this VBA failing?
I am very new to VBA and need to use an event to establish a database connection. But it's throwing an error when I add in this code:
Dim Myconnection As Connection
Dim Myrecordset As Recordset
Dim MyWorkbook As String
Why? These are just variable definitions. RIght?
Confused...
Thanks!
Dim Myconnection As Connection
Dim Myrecordset As Recordset
Dim MyWorkbook As String
Why? These are just variable definitions. RIght?
Confused...
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What is the error?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. How do I reference it in Excel 2007?
ASKER
I do not see Tools.
It's in the VBE menus, not the Excel application menus.
Kevin
Kevin
ASKER
Is that a button? Where is Tools in Excel 2007?
While looking at the Excel workbook, press ALT+F11 to switch to the VBE. You will then see the Tools menu.
Kevin
Kevin
ASKER
Thanks!
ASKER