![]() |
Multiple sheets using single chart
I was given a file containing 30 worksheets with values and one worksheet contains the graph. The graph worksheet has radio buttons 1 for each worksheet. When you click the radio button the graph present the values for the correspondent sheet. A macro has been assigned to each control. The macro is coping the required values to a “new” worksheet and the graph always display what is in the “new” worksheet. I am new to macros and VB programming. What I don’t like is that copy and paste – large amount of data is left in the clipboard. Please Help!! If you have a better idea of achieving the task please let me know. Macro: Sub ProdG1() ' ' ProdG1 Macro ' Macro recorded 21/07/2004 by bmccowan ' ' Application.ScreenUpdating = False Sheets("GM001").Select Columns("A:H").Select Range("A429").Activate Selection.Copy Sheets("Chart Values").Select Columns("A:H").Select Range("A429").Activate Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Sheets("Chart").Select Application.ScreenUpdating = True End Sub -- roumi ------------------------------------------------------------------------ roumi's Profile: http://www.excelforum.com/member.php...o&userid=24140 View this thread: http://www.excelforum.com/showthread...hreadid=377600 |
Multiple sheets using single chart
Roumi, try:
Sub ProdG1() Sheets("Chart Values").Columns("A:H").Cells.Value = _ Sheets("GM001").Columns("A:H").Cells.Value End Sub "roumi" wrote in message ... I was given a file containing 30 worksheets with values and one worksheet contains the graph. The graph worksheet has radio buttons 1 for each worksheet. When you click the radio button the graph present the values for the correspondent sheet. A macro has been assigned to each control. The macro is coping the required values to a "new" worksheet and the graph always display what is in the "new" worksheet. I am new to macros and VB programming. What I don't like is that copy and paste - large amount of data is left in the clipboard. Please Help!! If you have a better idea of achieving the task please let me know. Macro: Sub ProdG1() ' ' ProdG1 Macro ' Macro recorded 21/07/2004 by bmccowan ' ' Application.ScreenUpdating = False Sheets("GM001").Select Columns("A:H").Select Range("A429").Activate Selection.Copy Sheets("Chart Values").Select Columns("A:H").Select Range("A429").Activate Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Sheets("Chart").Select Application.ScreenUpdating = True End Sub -- roumi ------------------------------------------------------------------------ roumi's Profile: http://www.excelforum.com/member.php...o&userid=24140 View this thread: http://www.excelforum.com/showthread...hreadid=377600 |
Multiple sheets using single chart
won't just adding this line at the end of the code clear the clipboard
Application.CutCopyMode = False -- Gary "roumi" wrote in message ... I was given a file containing 30 worksheets with values and one worksheet contains the graph. The graph worksheet has radio buttons 1 for each worksheet. When you click the radio button the graph present the values for the correspondent sheet. A macro has been assigned to each control. The macro is coping the required values to a “new” worksheet and the graph always display what is in the “new” worksheet. I am new to macros and VB programming. What I don’t like is that copy and paste – large amount of data is left in the clipboard. Please Help!! If you have a better idea of achieving the task please let me know. Macro: Sub ProdG1() ' ' ProdG1 Macro ' Macro recorded 21/07/2004 by bmccowan ' ' Application.ScreenUpdating = False Sheets("GM001").Select Columns("A:H").Select Range("A429").Activate Selection.Copy Sheets("Chart Values").Select Columns("A:H").Select Range("A429").Activate Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Sheets("Chart").Select Application.ScreenUpdating = True End Sub -- roumi ------------------------------------------------------------------------ roumi's Profile: http://www.excelforum.com/member.php...o&userid=24140 View this thread: http://www.excelforum.com/showthread...hreadid=377600 |
Multiple sheets using single chart
Thank you Gary! That was the right command -- roumi ------------------------------------------------------------------------ roumi's Profile: http://www.excelforum.com/member.php...o&userid=24140 View this thread: http://www.excelforum.com/showthread...hreadid=377600 |
All times are GMT +1. The time now is 10:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com