Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Keep User Form Active
All,
I have managed to get my mini document configuration management tool running thanks to all the help I have received here. I have one problem I haven't been unable to resolve. When I select from the combobox, it searches the data base for all related documents\references and writes to the report sheet. However, it also closes the userform. How can I keep the userform in focus? Thanks, -- Brian McCaffery |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Keep User Form Active
You prpbably have either a useform.hide or a unload userform someplace in
your code that has to be removed. Check your combobox change function for any statements jusing the userrform methods. "Brian" wrote: All, I have managed to get my mini document configuration management tool running thanks to all the help I have received here. I have one problem I haven't been unable to resolve. When I select from the combobox, it searches the data base for all related documents\references and writes to the report sheet. However, it also closes the userform. How can I keep the userform in focus? Thanks, -- Brian McCaffery |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Keep User Form Active
Post the code and see if we can spot it.
-- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Brian" wrote in message ... All, I have managed to get my mini document configuration management tool running thanks to all the help I have received here. I have one problem I haven't been unable to resolve. When I select from the combobox, it searches the data base for all related documents\references and writes to the report sheet. However, it also closes the userform. How can I keep the userform in focus? Thanks, -- Brian McCaffery |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Keep User Form Active
Joel,
Thanks for the response. I can't find a userform.hide or unload anywhere. The code is a series of case statements. The code below shows only one. Private Sub ComboBox1_click() Dim i As Long Dim rng As Range Dim refrange As Range Dim c As Range ComboBox2.ListIndex = -1 ComboBox4.ListIndex = -1 ComboBox5.ListIndex = -1 Select Case ComboBox1.Value Case "GSOP_0286" Sheets("Report").Range("A4:I20").Clear Set refrange = Sheets("Sheet2").Range("A3:A20") i = 0 For Each c In refrange If c.Value = "" Then End Else s = Replace(c.Formula, "=", "") Set rng = Evaluate(s) rng.EntireRow.Copy Sheets("Report").Range("A4") _ .Offset(i, 0) _ .PasteSpecial Paste:= _ xlPasteAll, _ Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False i = i + 1 End If Next c End Select Any thoughts? Thanks, -- Brian McCaffery "Joel" wrote: You prpbably have either a useform.hide or a unload userform someplace in your code that has to be removed. Check your combobox change function for any statements jusing the userrform methods. "Brian" wrote: All, I have managed to get my mini document configuration management tool running thanks to all the help I have received here. I have one problem I haven't been unable to resolve. When I select from the combobox, it searches the data base for all related documents\references and writes to the report sheet. However, it also closes the userform. How can I keep the userform in focus? Thanks, -- Brian McCaffery |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Keep User Form Active
Check the ControlSource in the combobox properties window for each of your
comboboxes. It is possible that this combobox is triggering a change in another combobox and the 2nd combobox is closing the userform. I would put a break point at the start of each combobox. Also break point at each place the user form gets closed and see if you are getting to any of these break points. Use the F9 key to put the break point into the code. Then run the macro and see if any of the break point are reached. "Brian" wrote: Joel, Thanks for the response. I can't find a userform.hide or unload anywhere. The code is a series of case statements. The code below shows only one. Private Sub ComboBox1_click() Dim i As Long Dim rng As Range Dim refrange As Range Dim c As Range ComboBox2.ListIndex = -1 ComboBox4.ListIndex = -1 ComboBox5.ListIndex = -1 Select Case ComboBox1.Value Case "GSOP_0286" Sheets("Report").Range("A4:I20").Clear Set refrange = Sheets("Sheet2").Range("A3:A20") i = 0 For Each c In refrange If c.Value = "" Then End Else s = Replace(c.Formula, "=", "") Set rng = Evaluate(s) rng.EntireRow.Copy Sheets("Report").Range("A4") _ .Offset(i, 0) _ .PasteSpecial Paste:= _ xlPasteAll, _ Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False i = i + 1 End If Next c End Select Any thoughts? Thanks, -- Brian McCaffery "Joel" wrote: You prpbably have either a useform.hide or a unload userform someplace in your code that has to be removed. Check your combobox change function for any statements jusing the userrform methods. "Brian" wrote: All, I have managed to get my mini document configuration management tool running thanks to all the help I have received here. I have one problem I haven't been unable to resolve. When I select from the combobox, it searches the data base for all related documents\references and writes to the report sheet. However, it also closes the userform. How can I keep the userform in focus? Thanks, -- Brian McCaffery |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Automatically add a textbox to a user form based on user requireme | Excel Programming | |||
Displaying data in user form from active worksheet | Excel Programming | |||
How to: User Form to assign a user defined range to a macro variab | Excel Programming | |||
Active user form | Excel Programming | |||
Show user form, leave wosksheet active | Excel Programming |