Excel 2007 Forms show information

I

Imonit

Hello all. I tried looking for this information for the last 2 hours
now and cant find anything that actually helps or makes sense enough.

In an older 2003 Excel workbook I have a large information program
that takes input about employee files (car, major intersection, phone
# etc) to a form and then the form transfers it to a specified
area(s).

My company has just switched over to Vista and to Office 2007 and now
I cannot for the life of me figure out how to get a form to show (load
in Excel) by clicking a button. It works just fine in 2003 and I even
tried to export and import the form and I tried saving it as an XLSM
format and still can't get it to work.

My old code is this;

Private Sub cmdEditEmpInfo_Click()

frmEDITEmployee.Show

End Sub

Whenever I click that button in Excel 2007 only, I get a "Type
mismatch" error message. I read somewhere about a procdedure that
will open / show any form but it's like 40-50 lines of code
long!!!!!!!!!!!!!

It's really frustrating to see just about all you have self taught
yourself about VBA and Excel and then in the newer version they go and
change almost everything up just so it can be different. I'm sure
Excel 2007 is just fascinating but right now it's just frustrating for
something that should be so simple.

Can anyone please help me get the code I need for a form to show /
load during runtime?

Thanks in advance.

-Imonit
 
J

Jim Rech

frmEDITEmployee.Show

Put your cursor on that line and press F8. Repeat. Repeat. You should going
into some UserForm_Initialize code. Keep track of where you are so that
when the macro blows and throws you out you can find your way back there and
figure out what the problem is.

Btw, 99%+ of Excel 2003 code will run okay in 2007.

--
Jim
| Hello all. I tried looking for this information for the last 2 hours
| now and cant find anything that actually helps or makes sense enough.
|
| In an older 2003 Excel workbook I have a large information program
| that takes input about employee files (car, major intersection, phone
| # etc) to a form and then the form transfers it to a specified
| area(s).
|
| My company has just switched over to Vista and to Office 2007 and now
| I cannot for the life of me figure out how to get a form to show (load
| in Excel) by clicking a button. It works just fine in 2003 and I even
| tried to export and import the form and I tried saving it as an XLSM
| format and still can't get it to work.
|
| My old code is this;
|
| Private Sub cmdEditEmpInfo_Click()
|
| frmEDITEmployee.Show
|
| End Sub
|
| Whenever I click that button in Excel 2007 only, I get a "Type
| mismatch" error message. I read somewhere about a procdedure that
| will open / show any form but it's like 40-50 lines of code
| long!!!!!!!!!!!!!
|
| It's really frustrating to see just about all you have self taught
| yourself about VBA and Excel and then in the newer version they go and
| change almost everything up just so it can be different. I'm sure
| Excel 2007 is just fascinating but right now it's just frustrating for
| something that should be so simple.
|
| Can anyone please help me get the code I need for a form to show /
| load during runtime?
|
| Thanks in advance.
|
| -Imonit
 

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

Top