Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with form in excel VBA project

Status
Not open for further replies.

HorseGoose

Programmer
Apr 24, 2003
40
GB
I have been writing a program for about a two years and keeping it updated. I have just created a new procedure which calls a form and allows the user to edit comments in specific parts of the worksheet.

I called the form Notefrm. problem is when I call it from a proc. in the main module it gives me an object not defined error. I have exported and removed it then reimported it, I have changed its name that didn't work. I checked the object viewer and it is in the project, but i cannot call it from a proc.

Please help me as it has put a real stop on the update I was planning tpo issue.

Thanks

Feel free to e-mail directly

leebtaylor@eur.ko.com

Thanks Lee
 
Tried...

load Nfrm
Nfrm.show

I tried to load an existing form just to check and it worked. It is like the program dosen't see the new form.

I have also recompiled, removed and reimported nthe form and it still doesn't work.

I also thought that maybe the name was too similar to something else in Excel so I changed the name a few times too.

I think I am losing my mind. :-(

Lee.
 
Hi HorseGoose,

Just a small point but you say the form is called Notefrm and you tried Nfrm.Show. Typo here or in your code?

Enjoy,
Tony
 
I am changing the name of the form and also in the code. I would be embarassed too if that were the mistake, good point to ask though.

Tracey, whats your mail address so I can mail it?

L.
 
Fixed the problem. There was an issue with a variable reference in the initialise form sub() which made it look like the problem was in the calling proc. but in fact it was in the form.

Thanks anyway.

lee.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top