ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro: Prompt user for xls file to add chart (https://www.excelbanter.com/excel-programming/297747-macro-prompt-user-xls-file-add-chart.html)

Flystar[_4_]

Macro: Prompt user for xls file to add chart
 
I have a workbook called 'Source.xls' with a worksheet called 'Char
Data'. In 'Chart Data' I use a macro to generate data for producing
chart. I produce a chart in this worksheet, and then I want to promp
the user whether to also add this chart to another workbook (in
worksheet) - ie in a different xls file. How could I go about doin
this? All I have so far is:

Sub ProduceChart()

'Produce a chart

Dim sPrompt As String
sPrompt = MsgBox("Add this chart to another worksheet?"
Buttons:=vbOKCancel)

If sPrompt = vbOK Then
'Prompt for workbook and worksheet to add chart. This workbook (an
worksheet) may or may not be already open.
End If
End Su

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 11:45 PM.

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