Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Change active cell properties with command button

Matt wrote:

I have a command button(cmdExempt) that when I click it, I want it to first clear the formatting in the active cell, then remove the data validation, then change the font style to wingdings2, then set the font to bold, then change the font size to 20, then type a "P" in the cell. I cannot get it to work. Any help would be great. Thanks. Matt


Sub Macro1()
'
' Macro1 Macro
' Macro grabada el 30-01-2004 por Beto
'

'
Selection.ClearFormats
With Selection.Font
.Name = "Wingdings"
.Size = 20
.Bold = True
End With
Selection.Validation.Delete
ActiveCell.FormulaR1C1 = "P"
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(-1, 0).Select
End Sub

This should do it. Just assign it to the CommandButton. The last two
lines of code move awasy from the cell and then comes back, because I
didn't find another way to eliminate the dropdown arrow of validation
from the display.

Regards,
--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.

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
Command Button Properties FredL Excel Discussion (Misc queries) 2 February 14th 08 08:20 PM
command button properties gbeard Excel Worksheet Functions 4 April 21st 05 06:02 AM
Change active cell properties with command button Nick Excel Programming 2 January 30th 04 05:11 PM
Command Button that changes cell properties Henry[_5_] Excel Programming 0 January 30th 04 01:21 AM
Command Button Properties Darren O'Connell Excel Programming 1 July 17th 03 09:34 AM


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