Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default last cell as label caption

one more Q. how will i go to the last cell in column b and make that the
caption for label1?


As for your second item, this will do it...

Label1.Caption = Cells(25, "B").Value

Rick


"pswanie" wrote in message
...
i got a few labels on a userform. most of them in a frame.

1) few of them need to show data in sheet1 colum a cell 1 untill empty row

2) other just need to show sheet1 column b cell 25



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default last cell as label caption

maybe

Label1.Caption = Range("B65536").End(xlUp).Value

Mike

"pswanie" wrote:

one more Q. how will i go to the last cell in column b and make that the
caption for label1?


As for your second item, this will do it...

Label1.Caption = Cells(25, "B").Value

Rick


"pswanie" wrote in message
...
i got a few labels on a userform. most of them in a frame.

1) few of them need to show data in sheet1 colum a cell 1 untill empty row

2) other just need to show sheet1 column b cell 25



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default last cell as label caption

because of new limits in Excel 2007 (1 Mega rows) I recommend to do it this
way:
Label1.Caption = Cells(Cells.Rows.Count, 2).End(xlUp).Value

Vlado

"Mike H" wrote:

maybe

Label1.Caption = Range("B65536").End(xlUp).Value

Mike

"pswanie" wrote:

one more Q. how will i go to the last cell in column b and make that the
caption for label1?


As for your second item, this will do it...

Label1.Caption = Cells(25, "B").Value

Rick


"pswanie" wrote in message
...
i got a few labels on a userform. most of them in a frame.

1) few of them need to show data in sheet1 colum a cell 1 untill empty row

2) other just need to show sheet1 column b cell 25


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
label caption gramps Excel Discussion (Misc queries) 0 November 1st 07 03:56 PM
Linking Cell to Label Caption papaitaliano Excel Worksheet Functions 1 March 21st 06 05:23 PM
Link Cell to Label Caption papaitaliano Excel Discussion (Misc queries) 1 March 21st 06 05:21 PM
Link cell to Label Caption papaitaliano Excel Programming 2 March 21st 06 05:00 PM
label caption Rod Taylor Excel Programming 2 July 31st 03 03:25 AM


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