Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 300
Default Clearing a chart title with less lines of code

Right now to clear a chart title I'm running the below code. I would think
that I could clear it in a single line without having to activate the chart
object. But I haven't figured out how.

Dim SheetName As String, Here As String
SheetName = ActiveSheet.name
Here = ActiveCell.Address

Sheets("Graphs").Select
ActiveSheet.ChartObjects(1).Activate
ActiveChart.ChartArea.Select
ActiveChart.HasTitle = False

Range("A1").Select

Sheets(SheetName).Select
Range(Here).Select

Don <donwiss at panix.com.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Clearing a chart title with less lines of code

Hi Don,

Sheets("Graphs").ChartObjects(1).Chart.HasTitle = False

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Don Wiss" wrote in message
...
Right now to clear a chart title I'm running the below code. I would think
that I could clear it in a single line without having to activate the

chart
object. But I haven't figured out how.

Dim SheetName As String, Here As String
SheetName = ActiveSheet.name
Here = ActiveCell.Address

Sheets("Graphs").Select
ActiveSheet.ChartObjects(1).Activate
ActiveChart.ChartArea.Select
ActiveChart.HasTitle = False

Range("A1").Select

Sheets(SheetName).Select
Range(Here).Select

Don <donwiss at panix.com.



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
VB Code for clearing Cells Rich Excel Discussion (Misc queries) 2 September 2nd 07 08:40 PM
Code question for clearing a command checkbox. Newbeetle Excel Discussion (Misc queries) 4 February 13th 07 09:05 AM
Code crashes after clearing comments L. Howard Kittle Excel Worksheet Functions 2 February 20th 06 04:54 AM
Pasting Objects into Chart title and Axis title Sam Charts and Charting in Excel 1 June 6th 05 08:50 PM
Code Text Into Chart Lines? Phil Hageman Excel Programming 3 July 17th 03 11:51 AM


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