Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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# |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Programmatic access to visual basic project via Visual FoxPro | Excel Programming | |||
extending a chart with visual basic | Excel Programming | |||
Can I run Visual Basic procedure using Excel Visual Basic editor? | Excel Programming | |||
changing the visual basic in office 2003 to visual studio net | Excel Discussion (Misc queries) | |||
visual basic & chart data labels | Excel Programming |