Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 683
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 683
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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
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
Displaying data in user form from active worksheet Barb Reinhardt Excel Programming 3 October 16th 06 04:20 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
Active user form gregork Excel Programming 2 March 5th 04 06:46 AM
Show user form, leave wosksheet active Wric Smith Excel Programming 3 December 4th 03 08:46 PM


All times are GMT +1. The time now is 02:22 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"