Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ExportAsFixedFormat for Multiple Sheets in a Single Excel File | Excel Worksheet Functions | |||
Single Pivot Table 4 Multiple Sheets? | Excel Discussion (Misc queries) | |||
Multiple sheets as data for a single sheet | Excel Worksheet Functions | |||
Single list from multiple sheets | Excel Worksheet Functions | |||
Save multiple sheets in a single html page | Excel Programming |