Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Command Button Properties | Excel Discussion (Misc queries) | |||
command button properties | Excel Worksheet Functions | |||
Change active cell properties with command button | Excel Programming | |||
Command Button that changes cell properties | Excel Programming | |||
Command Button Properties | Excel Programming |