PDA

View Full Version : Solved: Allow workbook interaction while Form visible.



amarsha4
12-11-2008, 09:52 AM
Hi this is my first post,

I'm fairly new to VBA but have done a lot of VB6 coding.

I have an Excel spreadsheet with a list of names. I have coded routines to add and remove names from the list before sorting them again. What I want to achieve is a small form with two buttons, one to add a name and one to remove.

The thing is, I need the user to be able to interact with the sheet at all times, with what I have at the moment the sheet is locked until the form is closed.

Placing buttons on the form is an option, but not the most desirable as I don't want the user to have to scroll through the sheet to get to the buttons.

I have tried

Application.Interactive = True

But this seems to have no affect, I put a break in on this line which revealed that the statement was carried out, but still the worksheet was locked.

Any ideas? Out of all the code for this I didn't think it'd be this that tripped me up.

Bob Phillips
12-11-2008, 09:58 AM
When you show the form, show it modeless



Userform1.Show vbModeless

nst1107
12-11-2008, 09:59 AM
In Excel 2007, you can set a form's ShowModal property to False. That will allow the user to perform actions outside the form. But, it sound like you would prefer to have a small floating toolbar, instead. Check out this article: http://vbaexpress.com/kb/getarticle.php?kb_id=921

amarsha4
12-12-2008, 04:03 AM
Thanks guys, the first solution worked fine, and I'm definitely gonna check out more of those articles.

Andy