Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default How keep user form constant

Hi I recently posted a question about a user form and got it working
and figured out how to get it into excel...however, the only problem
is it only runs as soon as excel starts up and then waits for the user
to exit out of the box. Also, while it is up, it restricts the spread
sheet from being edited. Is there a way I could have the box always
be there and be able to simultaneously edit the spreadsheet? Sorry if
it is a bit unclear.

thank you!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default How keep user form constant

On Apr 17, 7:51 pm, wrote:
Hi I recently posted a question about a user form and got it working
and figured out how to get it into excel...however, the only problem
is it only runs as soon as excel starts up and then waits for the user
to exit out of the box. Also, while it is up, it restricts the spread
sheet from being edited. Is there a way I could have the box always
be there and be able to simultaneously edit the spreadsheet? Sorry if
it is a bit unclear.

thank you!


You should be able to make the form Modeless and it will "float" in
the foreground until you unload or hide the form. It will allow you
to interact with Excel while the form is open.

Sub CommandButton1_Click()
frmExample.Show vbModeless
End Sub

Matt

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default How keep user form constant

On Apr 17, 9:51 pm, wrote:
Hi I recently posted a question about a user form and got it working
and figured out how to get it into excel...however, the only problem
is it only runs as soon as excel starts up and then waits for the user
to exit out of the box. Also, while it is up, it restricts the spread
sheet from being edited. Is there a way I could have the box always
be there and be able to simultaneously edit the spreadsheet? Sorry if
it is a bit unclear.

thank you!


Thank you for your response! I have one more question...is there a
way I could either make the box stay on just one worksheet (say one
called rev and exp) rather than having it stay open while looking at
other worksheets? Or could I directly embed it into a worksheet?

  #6   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default How keep user form constant

Hi Alex -

One way would be to hide the form when the worksheet of interest is
deactivated and show the form when it is activated. Here's some code to do
that.

1. Procedure to load the form (copy to standard module):

Sub alex()
If ActiveSheet.Name = "YourWorksheetNameHere" Then
frmAlex.Show vbModeless
Else
Load frmYourForm
End If
End Sub

2. Procedures to automatically show or hide the form (copy to the worksheet
module):

Private Sub Worksheet_Activate()
frmYourForm.Show vbModeless
End Sub

Private Sub Worksheet_Deactivate()
frmYourForm.Hide
End Sub

---
Jay


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
Automatically add a textbox to a user form based on user requireme Brite Excel Programming 4 April 7th 07 11:37 PM
User form ComboBox Items: Remember user entries? [email protected] Excel Programming 0 March 29th 07 06:41 PM
get some user info and store as constant Steve E Excel Programming 4 September 13th 06 07:28 PM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM


All times are GMT +1. The time now is 03:33 PM.

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"