Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
zz zz is offline
external usenet poster
 
Posts: 32
Default 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   Report Post  
Posted to microsoft.public.excel.programming
zz zz is offline
external usenet poster
 
Posts: 32
Default 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
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
Changing the font for part of an axis label, not the whole label. amy45 Charts and Charting in Excel 2 April 5th 23 01:11 PM
How to rezize data label box in pie charts (label wraps to two lin rolliedogg Charts and Charting in Excel 1 October 18th 06 08:17 PM
dislike jump bottom of column by double-clicking the bottom of cel Joe Excel Discussion (Misc queries) 1 April 9th 06 09:27 PM
how to paste data from top to bottom to bottom to top Dave Peterson Excel Discussion (Misc queries) 0 January 25th 05 12:12 AM
Accesing a combobox control via it index propertie in VBA, Is itPossible? Muxer Excel Programming 3 July 30th 03 08:20 PM


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