LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Prevent UserForm on top of a worksheet from being dragged around screen

K --

Thanks for your comments and for introducing me to these concepts. It will
take a while to digest it.

I'll probably be back.

Larry


"keepITcool" wrote in message
...
Larry,

a quick scan of your code..



....


'Note: the form is currently shown..
'IF you have already SET the rowsource of SelectComponent THEN
'you'll be working and clearing in the rowsource of the control....


'That is slow.. may block cells, and trigger events on the form.
'So before working on a rowsource range be sure to "FREE" the range.


Me.lstSelectComponent.RowSource = vbNullString
Call FilterComponent_Rgn(g_strCellEqpSel, intRegionCode)
Me.lstSelectComponent.RowSource = _
ThisWorkbook.Range("result_prod_rgn_nonnull").Addr ess(external:
=True)



End Sub


Sub FilterComponent_List(ProdType As String, RegionCode As Integer)

'AVOID THE USE OF WINDOWS.. USE WORKBOOKS INSTEAD
'Windows(strBookSource) will not work if you have 2 windows for that
book open.

'you could set a worksheet variable..
'Dim ws As Worksheet
'Set ws = Workbooks(strBookSource).Worksheets(strSheetSource )
'then EITHER use
'ws.Range

'or With/end with

'With ws

'OR you could do it in 1 line..


With Workbooks(strBookSource).Worksheets(strSheetSource )

'within a WITH you need the DOT to "tunnel"
'populate ProductType and RegionCode cells in Sheet B

.Range(strRangeCriteriaProdType).Value = ProdType
.Range(strRangeCriteriaRgnCode).Value = RegionCode

.Range(strRangeExtract).ClearContents

.Range(strRangeData).AdvancedFilter _
Action:=xlFilterCopy, _
CriteriaRange:=Range(strRangeCriteria), _
CopyToRange:=Range(strRangeExtractTop), _
Unique:=True

'... code to strip blank values in Sheet B's extract range and
' put non-null values into Sheet B's range
"result_prod_rgn_nonnull"

End With


End Sub



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"L Mehl" wrote:

Me.lstSelectComponent.RowSource = "result_prod_rgn_nonnull"




 
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
How do I lock a screen to prevent scrolling? Roger Excel Discussion (Misc queries) 6 March 2nd 09 04:33 PM
prevent big white screen [email protected] Excel Worksheet Functions 1 May 30th 07 01:14 AM
how to let the userform autosize depending on the screen resolution Pierre via OfficeKB.com Excel Worksheet Functions 0 November 2nd 05 09:43 AM
Screen Updates on a userform Neil Excel Programming 2 October 17th 03 01:23 PM
Userform Screen Location Don A. Excel Programming 2 July 30th 03 10:58 PM


All times are GMT +1. The time now is 01:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"