Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Visual Basic Chart Moving

How do you move a specific chart to specific area. Here is the original code
(done in 2003 format). The program generates but after it moves the cahrts i
can not find them.

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Visual Basic Chart Moving

Not sure what you mean by this

The program generates but after it moves the cahrts i
can not find them.


Do you mean code can no longer find the chart in future attempts, ie the
chart does not exist on the sheet, or you cannot visually locate it.

What do you mean by "specific area". Following is a guess at what you are
after

Sub test()
Dim cel As Range
Dim chtObj As ChartObject

Set chtObj = ActiveSheet.ChartObjects("Chart 1")

Set cel = Range("D4")

With cel
chtObj.Left = cel.Left
chtObj.Top = cel.Top
End With

End Sub

Regards,
Peter T

"playerbigdog" wrote in message
...
How do you move a specific chart to specific area. Here is the original

code
(done in 2003 format). The program generates but after it moves the cahrts

i
can not find them.

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Visual Basic Chart Moving

Yeah i think you are the right track. This program generates approximately 50
diffent sheets which data for specific sities. While i run the program, i can
see charts being generated but after the program is done running and it saves
to my drive; i can not find my cahrts when i open the sheet.
Each sheet generates 25 different charts that are in a certain order and
place. This is what by placing each in a specific place in teh excel sheet.

"Peter T" wrote:

Not sure what you mean by this

The program generates but after it moves the cahrts i
can not find them.


Do you mean code can no longer find the chart in future attempts, ie the
chart does not exist on the sheet, or you cannot visually locate it.

What do you mean by "specific area". Following is a guess at what you are
after

Sub test()
Dim cel As Range
Dim chtObj As ChartObject

Set chtObj = ActiveSheet.ChartObjects("Chart 1")

Set cel = Range("D4")

With cel
chtObj.Left = cel.Left
chtObj.Top = cel.Top
End With

End Sub

Regards,
Peter T

"playerbigdog" wrote in message
...
How do you move a specific chart to specific area. Here is the original

code
(done in 2003 format). The program generates but after it moves the cahrts

i
can not find them.

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Visual Basic Chart Moving

You might try something like this

http://peltiertech.com/WordPress/200...rts-in-a-grid/
http://peltiertech.com/WordPress/200...rts-in-a-grid/

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


"playerbigdog" wrote in message
...
Yeah i think you are the right track. This program generates approximately
50
diffent sheets which data for specific sities. While i run the program, i
can
see charts being generated but after the program is done running and it
saves
to my drive; i can not find my cahrts when i open the sheet.
Each sheet generates 25 different charts that are in a certain order and
place. This is what by placing each in a specific place in teh excel
sheet.

"Peter T" wrote:

Not sure what you mean by this

The program generates but after it moves the cahrts i
can not find them.


Do you mean code can no longer find the chart in future attempts, ie the
chart does not exist on the sheet, or you cannot visually locate it.

What do you mean by "specific area". Following is a guess at what you are
after

Sub test()
Dim cel As Range
Dim chtObj As ChartObject

Set chtObj = ActiveSheet.ChartObjects("Chart 1")

Set cel = Range("D4")

With cel
chtObj.Left = cel.Left
chtObj.Top = cel.Top
End With

End Sub

Regards,
Peter T

"playerbigdog" wrote in message
...
How do you move a specific chart to specific area. Here is the original

code
(done in 2003 format). The program generates but after it moves the
cahrts

i
can not find them.

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Visual Basic Chart Moving

Hey, thanks.. those will help me out.. I appreciate the help boys...

"Jon Peltier" wrote:

You might try something like this

http://peltiertech.com/WordPress/200...rts-in-a-grid/
http://peltiertech.com/WordPress/200...rts-in-a-grid/

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


"playerbigdog" wrote in message
...
Yeah i think you are the right track. This program generates approximately
50
diffent sheets which data for specific sities. While i run the program, i
can
see charts being generated but after the program is done running and it
saves
to my drive; i can not find my cahrts when i open the sheet.
Each sheet generates 25 different charts that are in a certain order and
place. This is what by placing each in a specific place in teh excel
sheet.

"Peter T" wrote:

Not sure what you mean by this

The program generates but after it moves the cahrts i
can not find them.

Do you mean code can no longer find the chart in future attempts, ie the
chart does not exist on the sheet, or you cannot visually locate it.

What do you mean by "specific area". Following is a guess at what you are
after

Sub test()
Dim cel As Range
Dim chtObj As ChartObject

Set chtObj = ActiveSheet.ChartObjects("Chart 1")

Set cel = Range("D4")

With cel
chtObj.Left = cel.Left
chtObj.Top = cel.Top
End With

End Sub

Regards,
Peter T

"playerbigdog" wrote in message
...
How do you move a specific chart to specific area. Here is the original
code
(done in 2003 format). The program generates but after it moves the
cahrts
i
can not find them.

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Visual Basic Chart Moving

Sorry to double post but i was wondering what the third and fourth lines mean
(i.e what does the 866# and 300# mean)?

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#

"playerbigdog" wrote:

Hey, thanks.. those will help me out.. I appreciate the help boys...

"Jon Peltier" wrote:

You might try something like this

http://peltiertech.com/WordPress/200...rts-in-a-grid/
http://peltiertech.com/WordPress/200...rts-in-a-grid/

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


"playerbigdog" wrote in message
...
Yeah i think you are the right track. This program generates approximately
50
diffent sheets which data for specific sities. While i run the program, i
can
see charts being generated but after the program is done running and it
saves
to my drive; i can not find my cahrts when i open the sheet.
Each sheet generates 25 different charts that are in a certain order and
place. This is what by placing each in a specific place in teh excel
sheet.

"Peter T" wrote:

Not sure what you mean by this

The program generates but after it moves the cahrts i
can not find them.

Do you mean code can no longer find the chart in future attempts, ie the
chart does not exist on the sheet, or you cannot visually locate it.

What do you mean by "specific area". Following is a guess at what you are
after

Sub test()
Dim cel As Range
Dim chtObj As ChartObject

Set chtObj = ActiveSheet.ChartObjects("Chart 1")

Set cel = Range("D4")

With cel
chtObj.Left = cel.Left
chtObj.Top = cel.Top
End With

End Sub

Regards,
Peter T

"playerbigdog" wrote in message
...
How do you move a specific chart to specific area. Here is the original
code
(done in 2003 format). The program generates but after it moves the
cahrts
i
can not find them.

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Visual Basic Chart Moving

Those are distances in pixels. Ignore the #, which is a throwback to an
ancient dialect of Basic.

When working with chart positions and sizes, I prefer to work with the
ChartObject, and to use absolute properties .Left, .Top, .Width, and .Height
than relative properties like .IncrementLeft or .ScaleWidth.

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


"playerbigdog" wrote in message
...
Sorry to double post but i was wondering what the third and fourth lines
mean
(i.e what does the 866# and 300# mean)?

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#

"playerbigdog" wrote:

Hey, thanks.. those will help me out.. I appreciate the help boys...

"Jon Peltier" wrote:

You might try something like this

http://peltiertech.com/WordPress/200...rts-in-a-grid/
http://peltiertech.com/WordPress/200...rts-in-a-grid/

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


"playerbigdog" wrote in
message
...
Yeah i think you are the right track. This program generates
approximately
50
diffent sheets which data for specific sities. While i run the
program, i
can
see charts being generated but after the program is done running and
it
saves
to my drive; i can not find my cahrts when i open the sheet.
Each sheet generates 25 different charts that are in a certain order
and
place. This is what by placing each in a specific place in teh excel
sheet.

"Peter T" wrote:

Not sure what you mean by this

The program generates but after it moves the cahrts i
can not find them.

Do you mean code can no longer find the chart in future attempts, ie
the
chart does not exist on the sheet, or you cannot visually locate it.

What do you mean by "specific area". Following is a guess at what
you are
after

Sub test()
Dim cel As Range
Dim chtObj As ChartObject

Set chtObj = ActiveSheet.ChartObjects("Chart 1")

Set cel = Range("D4")

With cel
chtObj.Left = cel.Left
chtObj.Top = cel.Top
End With

End Sub

Regards,
Peter T

"playerbigdog" wrote in
message
...
How do you move a specific chart to specific area. Here is the
original
code
(done in 2003 format). The program generates but after it moves
the
cahrts
i
can not find them.

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#








  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Visual Basic Chart Moving

Hey thanks, i went in moved everything around.. the charts displayed perfect...
Though in my program i am hiding certain columns. Where i have placed the
charts do not overlap the columns i am hiding and yet when i hide them, it
completely delets my charts (no where to be found) and when i dont hide them,
the charts are there for all to see.. any suggestions?

"Jon Peltier" wrote:

Those are distances in pixels. Ignore the #, which is a throwback to an
ancient dialect of Basic.

When working with chart positions and sizes, I prefer to work with the
ChartObject, and to use absolute properties .Left, .Top, .Width, and .Height
than relative properties like .IncrementLeft or .ScaleWidth.

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


"playerbigdog" wrote in message
...
Sorry to double post but i was wondering what the third and fourth lines
mean
(i.e what does the 866# and 300# mean)?

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#

"playerbigdog" wrote:

Hey, thanks.. those will help me out.. I appreciate the help boys...

"Jon Peltier" wrote:

You might try something like this

http://peltiertech.com/WordPress/200...rts-in-a-grid/
http://peltiertech.com/WordPress/200...rts-in-a-grid/

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


"playerbigdog" wrote in
message
...
Yeah i think you are the right track. This program generates
approximately
50
diffent sheets which data for specific sities. While i run the
program, i
can
see charts being generated but after the program is done running and
it
saves
to my drive; i can not find my cahrts when i open the sheet.
Each sheet generates 25 different charts that are in a certain order
and
place. This is what by placing each in a specific place in teh excel
sheet.

"Peter T" wrote:

Not sure what you mean by this

The program generates but after it moves the cahrts i
can not find them.

Do you mean code can no longer find the chart in future attempts, ie
the
chart does not exist on the sheet, or you cannot visually locate it.

What do you mean by "specific area". Following is a guess at what
you are
after

Sub test()
Dim cel As Range
Dim chtObj As ChartObject

Set chtObj = ActiveSheet.ChartObjects("Chart 1")

Set cel = Range("D4")

With cel
chtObj.Left = cel.Left
chtObj.Top = cel.Top
End With

End Sub

Regards,
Peter T

"playerbigdog" wrote in
message
...
How do you move a specific chart to specific area. Here is the
original
code
(done in 2003 format). The program generates but after it moves
the
cahrts
i
can not find them.

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#









  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Visual Basic Chart Moving

Bizarre. What's the code look like, that hides the columns?

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


"playerbigdog" wrote in message
...
Hey thanks, i went in moved everything around.. the charts displayed
perfect...
Though in my program i am hiding certain columns. Where i have placed the
charts do not overlap the columns i am hiding and yet when i hide them, it
completely delets my charts (no where to be found) and when i dont hide
them,
the charts are there for all to see.. any suggestions?

"Jon Peltier" wrote:

Those are distances in pixels. Ignore the #, which is a throwback to an
ancient dialect of Basic.

When working with chart positions and sizes, I prefer to work with the
ChartObject, and to use absolute properties .Left, .Top, .Width, and
.Height
than relative properties like .IncrementLeft or .ScaleWidth.

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


"playerbigdog" wrote in message
...
Sorry to double post but i was wondering what the third and fourth
lines
mean
(i.e what does the 866# and 300# mean)?

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#

"playerbigdog" wrote:

Hey, thanks.. those will help me out.. I appreciate the help boys...

"Jon Peltier" wrote:

You might try something like this

http://peltiertech.com/WordPress/200...rts-in-a-grid/
http://peltiertech.com/WordPress/200...rts-in-a-grid/

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


"playerbigdog" wrote in
message
...
Yeah i think you are the right track. This program generates
approximately
50
diffent sheets which data for specific sities. While i run the
program, i
can
see charts being generated but after the program is done running
and
it
saves
to my drive; i can not find my cahrts when i open the sheet.
Each sheet generates 25 different charts that are in a certain
order
and
place. This is what by placing each in a specific place in teh
excel
sheet.

"Peter T" wrote:

Not sure what you mean by this

The program generates but after it moves the cahrts i
can not find them.

Do you mean code can no longer find the chart in future attempts,
ie
the
chart does not exist on the sheet, or you cannot visually locate
it.

What do you mean by "specific area". Following is a guess at what
you are
after

Sub test()
Dim cel As Range
Dim chtObj As ChartObject

Set chtObj = ActiveSheet.ChartObjects("Chart 1")

Set cel = Range("D4")

With cel
chtObj.Left = cel.Left
chtObj.Top = cel.Top
End With

End Sub

Regards,
Peter T

"playerbigdog" wrote in
message
...
How do you move a specific chart to specific area. Here is the
original
code
(done in 2003 format). The program generates but after it moves
the
cahrts
i
can not find them.

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#











  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Visual Basic Chart Moving

This is the code:
'Hides columns used for Duration Curves and Table
Range("H:V").EntireColumn.Hidden = True
'Hides colums used for the KW Duration/PF Curves
Range("AX:BH").EntireColumn.Hidden = True
'Hides columns used for the x-y scatter plots
Range("BR:CI").EntireColumn.Hidden = True
'Hides columns used for the Minimum PF Chart and the KVAR .98/.90 charts
Range("DW:ET").EntireColumn.Hidden = True
The other strange part is the the last three columns are under the graphs
and they do not affect the charts at all when hide. Only the first one does
(Duration Curves and Tables). Also, I have set up so that the columns hide
first and then the charts move. I have no clue?

"Jon Peltier" wrote:

Bizarre. What's the code look like, that hides the columns?

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


"playerbigdog" wrote in message
...
Hey thanks, i went in moved everything around.. the charts displayed
perfect...
Though in my program i am hiding certain columns. Where i have placed the
charts do not overlap the columns i am hiding and yet when i hide them, it
completely delets my charts (no where to be found) and when i dont hide
them,
the charts are there for all to see.. any suggestions?

"Jon Peltier" wrote:

Those are distances in pixels. Ignore the #, which is a throwback to an
ancient dialect of Basic.

When working with chart positions and sizes, I prefer to work with the
ChartObject, and to use absolute properties .Left, .Top, .Width, and
.Height
than relative properties like .IncrementLeft or .ScaleWidth.

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


"playerbigdog" wrote in message
...
Sorry to double post but i was wondering what the third and fourth
lines
mean
(i.e what does the 866# and 300# mean)?

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#

"playerbigdog" wrote:

Hey, thanks.. those will help me out.. I appreciate the help boys...

"Jon Peltier" wrote:

You might try something like this

http://peltiertech.com/WordPress/200...rts-in-a-grid/
http://peltiertech.com/WordPress/200...rts-in-a-grid/

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


"playerbigdog" wrote in
message
...
Yeah i think you are the right track. This program generates
approximately
50
diffent sheets which data for specific sities. While i run the
program, i
can
see charts being generated but after the program is done running
and
it
saves
to my drive; i can not find my cahrts when i open the sheet.
Each sheet generates 25 different charts that are in a certain
order
and
place. This is what by placing each in a specific place in teh
excel
sheet.

"Peter T" wrote:

Not sure what you mean by this

The program generates but after it moves the cahrts i
can not find them.

Do you mean code can no longer find the chart in future attempts,
ie
the
chart does not exist on the sheet, or you cannot visually locate
it.

What do you mean by "specific area". Following is a guess at what
you are
after

Sub test()
Dim cel As Range
Dim chtObj As ChartObject

Set chtObj = ActiveSheet.ChartObjects("Chart 1")

Set cel = Range("D4")

With cel
chtObj.Left = cel.Left
chtObj.Top = cel.Top
End With

End Sub

Regards,
Peter T

"playerbigdog" wrote in
message
...
How do you move a specific chart to specific area. Here is the
original
code
(done in 2003 format). The program generates but after it moves
the
cahrts
i
can not find them.

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#














  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Visual Basic Chart Moving

I still don't get it. You can experiment with the chart object properties.
In the Format Chart Area dialog, or if you shift click the chart to select
it as a shape and format it, on the Properties tab, choose Move but Don't
Size with Cells or Don't Move or Size with Cells. (This is just a guess!)

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


"playerbigdog" wrote in message
...
This is the code:
'Hides columns used for Duration Curves and Table
Range("H:V").EntireColumn.Hidden = True
'Hides colums used for the KW Duration/PF Curves
Range("AX:BH").EntireColumn.Hidden = True
'Hides columns used for the x-y scatter plots
Range("BR:CI").EntireColumn.Hidden = True
'Hides columns used for the Minimum PF Chart and the KVAR .98/.90
charts
Range("DW:ET").EntireColumn.Hidden = True
The other strange part is the the last three columns are under the graphs
and they do not affect the charts at all when hide. Only the first one
does
(Duration Curves and Tables). Also, I have set up so that the columns hide
first and then the charts move. I have no clue?

"Jon Peltier" wrote:

Bizarre. What's the code look like, that hides the columns?

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


"playerbigdog" wrote in message
...
Hey thanks, i went in moved everything around.. the charts displayed
perfect...
Though in my program i am hiding certain columns. Where i have placed
the
charts do not overlap the columns i am hiding and yet when i hide them,
it
completely delets my charts (no where to be found) and when i dont hide
them,
the charts are there for all to see.. any suggestions?

"Jon Peltier" wrote:

Those are distances in pixels. Ignore the #, which is a throwback to
an
ancient dialect of Basic.

When working with chart positions and sizes, I prefer to work with the
ChartObject, and to use absolute properties .Left, .Top, .Width, and
.Height
than relative properties like .IncrementLeft or .ScaleWidth.

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


"playerbigdog" wrote in
message
...
Sorry to double post but i was wondering what the third and fourth
lines
mean
(i.e what does the 866# and 300# mean)?

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#

"playerbigdog" wrote:

Hey, thanks.. those will help me out.. I appreciate the help
boys...

"Jon Peltier" wrote:

You might try something like this

http://peltiertech.com/WordPress/200...rts-in-a-grid/
http://peltiertech.com/WordPress/200...rts-in-a-grid/

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


"playerbigdog" wrote in
message
...
Yeah i think you are the right track. This program generates
approximately
50
diffent sheets which data for specific sities. While i run the
program, i
can
see charts being generated but after the program is done
running
and
it
saves
to my drive; i can not find my cahrts when i open the sheet.
Each sheet generates 25 different charts that are in a certain
order
and
place. This is what by placing each in a specific place in teh
excel
sheet.

"Peter T" wrote:

Not sure what you mean by this

The program generates but after it moves the cahrts i
can not find them.

Do you mean code can no longer find the chart in future
attempts,
ie
the
chart does not exist on the sheet, or you cannot visually
locate
it.

What do you mean by "specific area". Following is a guess at
what
you are
after

Sub test()
Dim cel As Range
Dim chtObj As ChartObject

Set chtObj = ActiveSheet.ChartObjects("Chart 1")

Set cel = Range("D4")

With cel
chtObj.Left = cel.Left
chtObj.Top = cel.Top
End With

End Sub

Regards,
Peter T

"playerbigdog" wrote
in
message
...
How do you move a specific chart to specific area. Here is
the
original
code
(done in 2003 format). The program generates but after it
moves
the
cahrts
i
can not find them.

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#














  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Visual Basic Chart Moving

You are right this is really wierd. But i started to X things out a long the
path. What i found is if i did not hide column 'J', the charts would show and
of course if i hide 'J' they would be there. So, everything is working great
and the progrma is running great... so far.... Thanks for your help!!!

"Jon Peltier" wrote:

I still don't get it. You can experiment with the chart object properties.
In the Format Chart Area dialog, or if you shift click the chart to select
it as a shape and format it, on the Properties tab, choose Move but Don't
Size with Cells or Don't Move or Size with Cells. (This is just a guess!)

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


"playerbigdog" wrote in message
...
This is the code:
'Hides columns used for Duration Curves and Table
Range("H:V").EntireColumn.Hidden = True
'Hides colums used for the KW Duration/PF Curves
Range("AX:BH").EntireColumn.Hidden = True
'Hides columns used for the x-y scatter plots
Range("BR:CI").EntireColumn.Hidden = True
'Hides columns used for the Minimum PF Chart and the KVAR .98/.90
charts
Range("DW:ET").EntireColumn.Hidden = True
The other strange part is the the last three columns are under the graphs
and they do not affect the charts at all when hide. Only the first one
does
(Duration Curves and Tables). Also, I have set up so that the columns hide
first and then the charts move. I have no clue?

"Jon Peltier" wrote:

Bizarre. What's the code look like, that hides the columns?

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


"playerbigdog" wrote in message
...
Hey thanks, i went in moved everything around.. the charts displayed
perfect...
Though in my program i am hiding certain columns. Where i have placed
the
charts do not overlap the columns i am hiding and yet when i hide them,
it
completely delets my charts (no where to be found) and when i dont hide
them,
the charts are there for all to see.. any suggestions?

"Jon Peltier" wrote:

Those are distances in pixels. Ignore the #, which is a throwback to
an
ancient dialect of Basic.

When working with chart positions and sizes, I prefer to work with the
ChartObject, and to use absolute properties .Left, .Top, .Width, and
.Height
than relative properties like .IncrementLeft or .ScaleWidth.

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


"playerbigdog" wrote in
message
...
Sorry to double post but i was wondering what the third and fourth
lines
mean
(i.e what does the 866# and 300# mean)?

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#

"playerbigdog" wrote:

Hey, thanks.. those will help me out.. I appreciate the help
boys...

"Jon Peltier" wrote:

You might try something like this

http://peltiertech.com/WordPress/200...rts-in-a-grid/
http://peltiertech.com/WordPress/200...rts-in-a-grid/

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


"playerbigdog" wrote in
message
...
Yeah i think you are the right track. This program generates
approximately
50
diffent sheets which data for specific sities. While i run the
program, i
can
see charts being generated but after the program is done
running
and
it
saves
to my drive; i can not find my cahrts when i open the sheet.
Each sheet generates 25 different charts that are in a certain
order
and
place. This is what by placing each in a specific place in teh
excel
sheet.

"Peter T" wrote:

Not sure what you mean by this

The program generates but after it moves the cahrts i
can not find them.

Do you mean code can no longer find the chart in future
attempts,
ie
the
chart does not exist on the sheet, or you cannot visually
locate
it.

What do you mean by "specific area". Following is a guess at
what
you are
after

Sub test()
Dim cel As Range
Dim chtObj As ChartObject

Set chtObj = ActiveSheet.ChartObjects("Chart 1")

Set cel = Range("D4")

With cel
chtObj.Left = cel.Left
chtObj.Top = cel.Top
End With

End Sub

Regards,
Peter T

"playerbigdog" wrote
in
message
...
How do you move a specific chart to specific area. Here is
the
original
code
(done in 2003 format). The program generates but after it
moves
the
cahrts
i
can not find them.

ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").IncrementLeft 866#
ActiveSheet.Shapes("Chart 2").IncrementTop 300#















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
Programmatic access to visual basic project via Visual FoxPro Jim Rech Excel Programming 0 January 11th 07 01:53 PM
extending a chart with visual basic Denis[_4_] Excel Programming 1 December 2nd 06 03:19 PM
Can I run Visual Basic procedure using Excel Visual Basic editor? john.jacobs71[_2_] Excel Programming 3 December 26th 05 02:22 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
visual basic & chart data labels LES Excel Programming 1 July 22nd 05 04:15 PM


All times are GMT +1. The time now is 08:22 PM.

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"