LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default URGENT help needed for a macro to place and size command button

GS expressed precisely :
Oops! I made a mistake. Revise as follows...


Sub ResetButtons()
Dim n As Long, v As Variant, iPos As Integer
Const sButtonData As String = _
"Button 71:BI153,Button 72:BI154,Button 73:BI155" 'edit to suit

v = Split(sButtonData, ",")
For n = LBound(v) To UBound(v)

iPos = InStr(1, v(n), ":")
With Sheets("Contest Data").Buttons(Mid$(v(n), 1, iPos - 1))
.Top = Sheets("Contest Data").Range(Mid$(v(n), iPos + 1)).Top
.Left = Sheets("Contest Data").Range(Mid$(v(n), iPos + 1)).Left
.Width = 35: .Height = 18
End With
Next 'n
End Sub


Sorry about that!

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


 
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
Command button font size changes AJ Excel Discussion (Misc queries) 0 June 27th 08 03:28 AM
command button code needed pswanie Excel Programming 2 January 3rd 08 06:10 PM
Help needed moving a command button Karoo News[_2_] Excel Programming 1 January 30th 06 04:18 AM
Bug: Command Button Text Size Changes charlie oppenheimer Excel Programming 3 August 22nd 05 12:06 AM
Urgent: VBA Command Button Caption Problem Disco[_4_] Excel Programming 1 November 12th 03 10:38 AM


All times are GMT +1. The time now is 04:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"