Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to load userforms in excel (vb)

10

Hi all,

I am Zisko-Kid and I have 4 userforms in Excel where user's enter dat
which would then be stored in an excel spreadsheet. It was fine to th
point where the 4th form has a command button to allow user to ente
another sale which would bring them back to the first form and thi
should loop through each form til the user has entered enough sales t
click on Exit program. Its not allowing this and gives me this erro
message:

Run-time error '402'

Must close or hide topmost modal form first.

I've tried in the command button (cmdnew)
unload salesleadform
load salesleadform
salesleadform.show

I am open to any suggestions

thank you kindl

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default How to load userforms in excel (vb)

Normally you would have something like this

'In a module
Sub Control
frm1.show
'handle the data returned
unload frm1
frm2.show
'handle the data returned
Unload frm2
End Sub

'in frm1 code, and frm2 code, etc
cmdOK_Click
me.hide
End Sub

But it sounds like you would be much better off using a multipage control on
a single user form and moving from page to page as the user enters data.

Robin Hammond
www.enhanceddatasystems.com


"zisko3 " wrote in message
...
10

Hi all,

I am Zisko-Kid and I have 4 userforms in Excel where user's enter data
which would then be stored in an excel spreadsheet. It was fine to the
point where the 4th form has a command button to allow user to enter
another sale which would bring them back to the first form and this
should loop through each form til the user has entered enough sales to
click on Exit program. Its not allowing this and gives me this error
message:

Run-time error '402'

Must close or hide topmost modal form first.

I've tried in the command button (cmdnew)
unload salesleadform
load salesleadform
salesleadform.show

I am open to any suggestions

thank you kindly


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Control arrays on Excel 2007 userforms Informative Excel Discussion (Misc queries) 1 February 26th 08 09:36 PM
Excel and launching userforms Lumpjaw New Users to Excel 6 August 21st 06 01:39 AM
Userforms in Excel 2003 created in Excel 2000 [email protected] Excel Discussion (Misc queries) 2 October 5th 05 12:31 PM
Help Userforms / Excel SUMIF Hopest Excel Worksheet Functions 4 June 3rd 05 05:38 PM
Interfacing OL2002 Cal and Excel Userforms Bruccce Excel Programming 1 September 3rd 03 03:37 AM


All times are GMT +1. The time now is 01:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"