Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default How do you automatically display a vba form in excel 2007

I have created a form in excel 2007 developer that manipulated data on two of
the sheets. Somehow I want the customer to be able to activate the form from
one of the sheets so they do not have to run it from developer. I tried to
create a macro but once the form activates you cannot stop the macro. I am
just learning the developer portion of this software so I you have any ideas
please share.

Thanks Much
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default How do you automatically display a vba form in excel 2007

Can we see the code you wrote?

Actually all that you need to open a UserForm is a one liner as:

Sub Button_Click()
userFormName.Show
End Sub

By default, UserForms are displayed as Modal. Meaning that they then take
control and their code is in use until they transfer control somehow, usually
somewhere within the UserForm you have a button that pretty much wraps it all
up as:

Sub CancelButton_Click()
Unload Me ' takes the userform completely out of memory
'or (and this wouldn't work with the Unload Me still in the code above)
Me.Hide ' removes it from view
End Sub

If you want the form to display and still have other processing continue,
set the form's Modal property to false. This is handy if you want to display
a form to show some progress indicator or such while the main code continues
to run and update the contents of the UserForm:

Sub DoALongProcess()
NotificationForm.Show
'code in here to do some long process
'with some content of the NotificationForm updated periodically
'during that processing, and then when it's all done
Unload NotificationForm
End Sub

"Kathryn" wrote:

I have created a form in excel 2007 developer that manipulated data on two of
the sheets. Somehow I want the customer to be able to activate the form from
one of the sheets so they do not have to run it from developer. I tried to
create a macro but once the form activates you cannot stop the macro. I am
just learning the developer portion of this software so I you have any ideas
please share.

Thanks Much

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
Display contents of a cell in a user form text box -- Excel 2003 VBA hiskilini Excel Discussion (Misc queries) 7 April 4th 23 10:22 AM
Display Charts Created In Excel In A Windows Form Arvindtn Charts and Charting in Excel 0 September 15th 06 03:19 PM
Open Form Automatically in Excel File Bejewell New Users to Excel 1 November 16th 05 06:18 PM
Display form from an VB application in Excel kuhni Excel Discussion (Misc queries) 0 August 10th 05 06:04 PM
In Excel how can a number automatically display in text form Curtis A Excel Worksheet Functions 2 February 26th 05 11:31 AM


All times are GMT +1. The time now is 12:43 AM.

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

About Us

"It's about Microsoft Excel"