ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PIP (https://www.excelbanter.com/excel-programming/389271-pip.html)

Sam

PIP
 
Is there a way to display a 2-column range in a userform control (perhaps an
image control)? I want to be able to view rows 1-52 of two columns while I am
at any point on the worksheet (e.g. row 3000). I will always have access to a
userform.

Any help would be appreciated.

JLGWhiz

PIP
 
You could use a List Box on a UserForm and call it up with a macro when you
want to see it. If the two columns you want to load are side by side then
you could use the RowSource property to load the ListBox, or in the
Initialize macro for the UserForm you could use the AddItem or List methods
if they are not side by side.
See the VBA help file for ListBox, List Property and AddItem propety for
additional details.

"Sam" wrote:

Is there a way to display a 2-column range in a userform control (perhaps an
image control)? I want to be able to view rows 1-52 of two columns while I am
at any point on the worksheet (e.g. row 3000). I will always have access to a
userform.

Any help would be appreciated.


Carl Hartness[_2_]

PIP
 
I've had a lot of success loading userform listboxes directly from
arrays with
dim myArray as Variant
myArray = Range("A1:B10")
ListBox1.List = myArray
You will have to set ColumnCount in the Listbox properties, and
probably set
ColumnWidths as well.

Carl.

On May 11, 6:38 pm, Sam wrote:
Is there a way to display a 2-column range in a userform control (perhaps an
image control)? I want to be able to view rows 1-52 of two columns while I am
at any point on the worksheet (e.g. row 3000). I will always have access to a
userform.

Any help would be appreciated.





All times are GMT +1. The time now is 10:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com