Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
set the bottom propertie of a label
i have this routine in a userform, what this does is generate a label for
each range in the "a" column in the activesheet, representing a 'bars graph', this works fine, it show the 'bars' and the values into the bars, but i don't like the way this get aligned, it looks like they're hanging from the uppermost border of the containing frame , i'd like them to look like a real graph with the bars 'pointing' upside, i've been playing with the top property of the label but unfortunately doesn't work for me. i would like to resemble the bottom property and align the labels in the bottom of the frame --------the sub--------- Private Sub create_graphic() Dim i As Integer, r As Range Frame1.Caption = "Month trends" i = 1 Do Until Range("a" & i).Value = "" Frame1.Controls.Add "forms.Label.1", "label" & i, True Controls("label" & i).Height = Range("A" & i + 1).Value Controls("label" & i).Width = 15 Controls("label" & i).BackColor = RGB(250, 120, 10) Controls("label" & i).Left = i * 15 Controls("label" & i).ForeColor = RGB(250, 250, 250) Controls("label" & i).Caption = Range("A" & i + 1).Value Controls("label" & i).BorderStyle = 1 Controls("label" & i).BorderColor = RGB(255, 255, 255) Controls("label" & i).Font.Bold = True Controls("label" & i).Font.Size = 5 i = i + 1 Loop End Sub thanks in advantage -- --- zz [MX] cuasi-musico,semi-poeta y loco |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
set the bottom propertie of a label
forget it, i added this line and is working now
Controls("label" & i).Top = Frame1.Top + Frame1.Height - Controls("label" & i).Height look like guadalupe-reyes still doing effect.... XD -- --- zz [MX] cuasi-musico,semi-poeta y loco "zz" wrote in message ... i have this routine in a userform, what this does is generate a label for each range in the "a" column in the activesheet, representing a 'bars graph', this works fine, it show the 'bars' and the values into the bars, but i don't like the way this get aligned, it looks like they're hanging from the uppermost border of the containing frame , i'd like them to look like a real graph with the bars 'pointing' upside, i've been playing with the top property of the label but unfortunately doesn't work for me. i would like to resemble the bottom property and align the labels in the bottom of the frame --------the sub--------- Private Sub create_graphic() Dim i As Integer, r As Range Frame1.Caption = "Month trends" i = 1 Do Until Range("a" & i).Value = "" Frame1.Controls.Add "forms.Label.1", "label" & i, True Controls("label" & i).Height = Range("A" & i + 1).Value Controls("label" & i).Width = 15 Controls("label" & i).BackColor = RGB(250, 120, 10) Controls("label" & i).Left = i * 15 Controls("label" & i).ForeColor = RGB(250, 250, 250) Controls("label" & i).Caption = Range("A" & i + 1).Value Controls("label" & i).BorderStyle = 1 Controls("label" & i).BorderColor = RGB(255, 255, 255) Controls("label" & i).Font.Bold = True Controls("label" & i).Font.Size = 5 i = i + 1 Loop End Sub thanks in advantage -- --- zz [MX] cuasi-musico,semi-poeta y loco |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing the font for part of an axis label, not the whole label. | Charts and Charting in Excel | |||
How to rezize data label box in pie charts (label wraps to two lin | Charts and Charting in Excel | |||
dislike jump bottom of column by double-clicking the bottom of cel | Excel Discussion (Misc queries) | |||
how to paste data from top to bottom to bottom to top | Excel Discussion (Misc queries) | |||
Accesing a combobox control via it index propertie in VBA, Is itPossible? | Excel Programming |