Excel 2007 Forms

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

Guest

It appears Excel 2003 and Excel 2007 put the user forms in a separate module
from the modules that excute code in the workbook.
In Excel 2003 I had code that referenced the form via UserForm.show in the
main startup module . This code generates an error in Excel 2007. Also
calls to subroutines in the code behind the form from the other modules
generates and undefined error. How does Excel 2007 link these two modules
now so that one can reference items in them.

Thanks
Brad Wylie
 
Odd you're having these problems. I have found absolutely no difference in
how userforms work in Excel 2007. If you want to send me a simple example
the works in 2003 and bombs in 2007 I'd like to see it.
 
Jim,

This is a 2003 .xls file that was resaved in the native 2007 .xlsm format.
All the macros work fine the problem only occurs in trying to access the
forms. I have checked the properties of the form and Microsoft did not
change the name during the conversion (which I have found they have been
known to do at times). I have not tried to recreate this program from
scratch in the native format but I have tried creating a new duplicate form
but it yields the same result.

Here is the code that gets executed when you double click a cell in the
speadsheet to initate the payroll part of the code.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel
As Boolean)


' Run Payroll Module

MainPayrollModule
End

End Sub


Sub MainPayrollModule()
'
'
' *********** Create the bi-weekly payroll **************
'
' MsgBox "Starting MainModule/MainPayrollModule."
frmPayrollForm.Show 'load, show the dialog box and process
 

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