Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formatting charts, problem with deselection.
Hello all,
I wrote a Sub to format all charts equally once selected and running the procedu Sub ChartMods() If ActiveChart Is Nothing Then MsgBox "No chart selected" Exit Sub End If With ActiveChart .ChartArea.Font.Name = "Arial" .ChartArea.Font.FontStyle = "Regular" .ChartArea.Font.Size = 16 End With End Sub Then I made the following call: Private Sub CommandButton1_Click() Call ChartMods End Sub But the problem is: when I select the chart and then click the button, the chart gets deselected and the button becomes active in stead of the chart. What Am I Overlooking? thanks in advance. Fries |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formatting charts, problem with deselection.
Set the changefocusonclick property of the command button to false.
-- Regards, Tom Ogilvy "Fries" wrote in message om... Hello all, I wrote a Sub to format all charts equally once selected and running the procedu Sub ChartMods() If ActiveChart Is Nothing Then MsgBox "No chart selected" Exit Sub End If With ActiveChart .ChartArea.Font.Name = "Arial" .ChartArea.Font.FontStyle = "Regular" .ChartArea.Font.Size = 16 End With End Sub Then I made the following call: Private Sub CommandButton1_Click() Call ChartMods End Sub But the problem is: when I select the chart and then click the button, the chart gets deselected and the button becomes active in stead of the chart. What Am I Overlooking? thanks in advance. Fries |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Weard problem with formatting of charts in Excel 2007 | Excel Discussion (Misc queries) | |||
Group page selection and deselection | Excel Discussion (Misc queries) | |||
excel 2000 shortcut for deselection | Excel Discussion (Misc queries) | |||
Formatting pie charts via VBA | Charts and Charting in Excel | |||
Formatting Charts | Excel Discussion (Misc queries) |