![]() |
Using Form and Worksheet At the Same Time
Thanks Tom. You're a saint!!! :)
Adding vbModeless after frmDatabase.Show makes it work perfect - just like I wanted. Thanks so much, Rick -----Original Message----- by default, the form is shown modal - in xl2000, they added the option to show it modeless Sub ShowTheForm() frmDatabase.Show vbModeless End Sub Regards, Tom Ogilvy "Rick" wrote in message ... How can I show the form, pick some items on a dropdown box on the form to run some code, and then change my focus back to the worksheet - and leave the form showing - ready for another time to use? Right now, I bring up the form, pick the items from the form etc., but I have to exit (unload) the form before doing it again. It would be nice to have the form on the top-left corner of the spreadsheet continuously, to use when I need it. I think there is some code to do this - to allow this to happen this way, but I can't remember what it is. OK, this is what I've done so far (writing it in simple terms). Sub ShowTheForm() frmDatabase.Show End Sub Private Sub cboData_Change()'Dropdown box on the form Dim S1 As Worksheet Dim i As Integer, j As Integer Set S1 = Sheets("Data") For i = 0 To 3 If Me.cboData.ListIndex = i Then If Application.ActiveCell.Row = 12 Then For j = 0 To 3 '(Data is taken from S1 and placed on activecell) Next j Exit For End If End If Next i Application.ActiveCell.Select 'I tried using this.... 'Unload Me (this is an option) End Sub Thanks, Rick . |
All times are GMT +1. The time now is 12:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com