LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Command Buttons on Sheet moving with cells

Todd,

Save the position beforehand, and restore it afterwards. Something like

Dim pos1 As Double

With Worksheets("Sheet2")
pos1 = .CommandButton1.Left
.Columns("A:IV").AutoFit
.CommandButton1.Left = pos1
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Todd Huttenstine" wrote in message
...
Hey guys,

I am using the following code supplied by Nigel that
autofits columns based on cell value. The problem is that
my command buttons also move with the movement of the
cells. How do I stop this?

Worksheets("Sheet1").Columns("A:IV").AutoFit
Thanx

Todd



 
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 buttons linked to moving rows steal_92 Excel Discussion (Misc queries) 2 June 11th 09 03:04 PM
Command Buttons on sheet changing sizes Dan Excel Discussion (Misc queries) 2 February 4th 09 02:36 PM
Putting Command Buttons on a Chart Sheet Kremlin Charts and Charting in Excel 2 May 11th 05 01:06 PM
Embedding command buttons in cells Andy Excel Programming 3 November 25th 03 11:37 PM
Control Buttons vs. Command Buttons Robert Gibson Excel Programming 1 October 13th 03 04:33 PM


All times are GMT +1. The time now is 10:19 PM.

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"