Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default label to display multi rows and colums on a userform

what code would i put where to get a label (label1) to check all lines with
data in colum c then display colum c and d and e.

colum a have a discription
colum b the start date
colum c the end date

if the system can see if it ended and not display that.

a b c
special a 01/02/07 31/03/08
special b 18/11/07 22/02/08
special c 11/08/07 18/01/08

this is code that i got all ready.


Private Sub userform1_Initialize()


userform1.Label1 = Worksheets("sheet1").Range.c

End Sub

Private Sub CommandButton1_Click()

Dim lRow As Long, i As Integer
For i = 3 To 5
lRow = Cells(Rows.Count, i).End(xlUp).Row
Cells(lRow + 1, i) = Me.Controls("TextBox" & i - 2).Value
Next i
userform1.Hide
End Sub


and this is a previous attemp that worked but not on a user form

Sub Auto_Open()
Dim S As String
Dim R As Range
'<<< CHANGE SHEET AND RANGE AS REQUIRED
Set R = ThisWorkbook.Worksheets("Sheet1").Range("C1")

Do Until R.Value = vbNullString ' loop until empty cell in C
If R(1, 2).Value <= Now Then ' Start Date
If R(1, 3).Value = Now Then ' End Date
S = S & R.Text & vbCrLf
End If
End If
Set R = R(2, 1) ' move down in C
Loop

If S < vbNullString Then
MsgBox S, vbOKOnly, "Specials"
End If
End Sub

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
change rows and colums to display alpha instead of numerics rabbit Excel Discussion (Misc queries) 1 March 31st 09 03:55 PM
how to label multi cells respectively in excel alexasanford Excel Worksheet Functions 4 March 6th 07 09:06 PM
How do I label the colums as numbers and the rows as letters? C Farley Excel Discussion (Misc queries) 0 April 20th 06 08:49 PM
Print few rows with many colums so that rows wrap on printed pages usfgradstudent31 Excel Discussion (Misc queries) 1 October 20th 05 02:39 PM
How to make a multi-column label? Mac Lingo[_2_] Excel Programming 4 September 9th 05 07:07 PM


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