ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Chart or Shape Object: A Place To Stash A Few Bytes? (https://www.excelbanter.com/excel-programming/378579-chart-shape-object-place-stash-few-bytes.html)

(PeteCresswell)

Chart or Shape Object: A Place To Stash A Few Bytes?
 
MS Access .Control objects have a .Tag property where you can store whatever you
need.

Does anybody know of something analogous in a .Chart or .Shape?

I need to store a range address like "$R05$C13:$R45$C22".
--
PeteCresswell

Peter T

Chart or Shape Object: A Place To Stash A Few Bytes?
 
I just posted something in your earlier thread.

Peter T

"(PeteCresswell)" wrote in message
...
MS Access .Control objects have a .Tag property where you can store

whatever you
need.

Does anybody know of something analogous in a .Chart or .Shape?

I need to store a range address like "$R05$C13:$R45$C22".
--
PeteCresswell




Jon Peltier

Chart or Shape Object: A Place To Stash A Few Bytes?
 
Hi Pete -

I think PowerPoint shapes have this, but Excel shapes do not. However, you
could add an invisible textbox to a chart:

activechart.Shapes.AddTextbox(msoTextOrientationHo rizontal,0,0,100,15).Name
= "MyTag"
activechart.Shapes("MyTag").TextFrame.Characters.T ext="$R05$C13:$R45$C22"
activechart.Shapes("MyTag").Visible=false
?activechart.Shapes("MyTag").TextFrame.Characters. Text
$R05$C13:$R45$C22

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______



"(PeteCresswell)" wrote in message
...
MS Access .Control objects have a .Tag property where you can store
whatever you
need.

Does anybody know of something analogous in a .Chart or .Shape?

I need to store a range address like "$R05$C13:$R45$C22".
--
PeteCresswell




(PeteCresswell)

Chart or Shape Object: A Place To Stash A Few Bytes?
 
Per Jon Peltier:
I think PowerPoint shapes have this, but Excel shapes do not. However, you
could add an invisible textbox to a chart:

activechart.Shapes.AddTextbox(msoTextOrientationH orizontal,0,0,100,15).Name
= "MyTag"
activechart.Shapes("MyTag").TextFrame.Characters. Text="$R05$C13:$R45$C22"
activechart.Shapes("MyTag").Visible=false
?activechart.Shapes("MyTag").TextFrame.Characters .Text
$R05$C13:$R45$C22


Thanks. That will definitely do it. I'll hold off on merging the chart
creation/positioning processes and give that a shot.
--
PeteCresswell

Jon Peltier

Chart or Shape Object: A Place To Stash A Few Bytes?
 
Actually, to me it sounded like a fine idea to create and position the chart
all at once. In fact, using mySheet.ChartObjects.Add() does both at once;
check the documentation or look for it he

http://peltiertech.com/Excel/ChartsH...kChartVBA.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"(PeteCresswell)" wrote in message
...
Per Jon Peltier:
I think PowerPoint shapes have this, but Excel shapes do not. However, you
could add an invisible textbox to a chart:

activechart.Shapes.AddTextbox(msoTextOrientation Horizontal,0,0,100,15).Name
= "MyTag"
activechart.Shapes("MyTag").TextFrame.Characters .Text="$R05$C13:$R45$C22"
activechart.Shapes("MyTag").Visible=false
?activechart.Shapes("MyTag").TextFrame.Character s.Text
$R05$C13:$R45$C22


Thanks. That will definitely do it. I'll hold off on merging the chart
creation/positioning processes and give that a shot.
--
PeteCresswell




(PeteCresswell)

Chart or Shape Object: A Place To Stash A Few Bytes?
 
Per Jon Peltier:
Actually, to me it sounded like a fine idea to create and position the chart
all at once. In fact, using mySheet.ChartObjects.Add() does both at once;
check the documentation or look for it he

http://peltiertech.com/Excel/ChartsH...kChartVBA.html


I thought so too... but the invisible text box solution is working a-ok for me
and I'm going to stick with what I've got until the user sees some output that
they like.

By then, I'll have some elapsed time logging in the process and when I go back
to optimize that'll be a good time to make the big change. That way I'm
covered in case the big change takes too long and the user needs the output
ASAP.....
--
PeteCresswell

Jon Peltier

Chart or Shape Object: A Place To Stash A Few Bytes?
 
Well, yeah, you don't want to break something that's working fine. That's
why I was up till midnight, because I made a couple improvements to a
working and near production project, but also incorporated a couple
glitches.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"(PeteCresswell)" wrote in message
...
Per Jon Peltier:
Actually, to me it sounded like a fine idea to create and position the
chart
all at once. In fact, using mySheet.ChartObjects.Add() does both at once;
check the documentation or look for it he

http://peltiertech.com/Excel/ChartsH...kChartVBA.html


I thought so too... but the invisible text box solution is working a-ok
for me
and I'm going to stick with what I've got until the user sees some output
that
they like.

By then, I'll have some elapsed time logging in the process and when I go
back
to optimize that'll be a good time to make the big change. That way I'm
covered in case the big change takes too long and the user needs the
output
ASAP.....
--
PeteCresswell




(PeteCresswell)

Chart or Shape Object: A Place To Stash A Few Bytes?
 
Per Jon Peltier:
because I made a couple improvements to a
working and near production project, but also incorporated a couple
glitches.


Thanks for that one.... I'm always gratified to hear that it isn't just me...-)
--
PeteCresswell

ilia

Chart or Shape Object: A Place To Stash A Few Bytes?
 
Declare a new class module and add whatever bytes you want to stash,
along with the chart object.

(PeteCresswell) \/\/|20+3:
MS Access .Control objects have a .Tag property where you can store whatever you
need.

Does anybody know of something analogous in a .Chart or .Shape?

I need to store a range address like "$R05$C13:$R45$C22".
--
PeteCresswell




All times are GMT +1. The time now is 07:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com