What is wrong with this code?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm a novice at VBA. I want an add-in data form to display when the workbook
is opened. I have the following code, but nothing happens when the workbook
is opened. I still have to manually select Data from the menu followed by
selecting the add-in form from the drop down list to display the form on
screen. Can someone help me with this.

Sub Workbook_Open()
Application.Run "dataform2.xla!ShowDataForm"
End Sub


TIA
 
Where are you putting the code? It should be in the ThisWorkbook
code module, not a regular code module.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
This Worked for me in Excel 2000

Dim x

x = Application.Run("personal.xls!bottomrow")

seems like it needs to start with
variable =
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top