LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default allow user to change workbook while in Msgbox or InputBox

Hi guys,
This is probably a question of vocab - I didn't know the right terms to
search for, so my apologies if this has been answered.

I need to prompt a user to select a chart and then set that chart to a
variable in my code. The trick is that the chart will be in a
different workbook; is there a way to pop up a message, allow the user
to activate a different workbook and then return to the message a click
OK? I don't know if msgbox or inputbox would allow this.

The general schematic is as follows:

Dim ch as Chart
dim ans as Integer
On Error Resume Next
ans = MsgBox("Please Select a Chart to Modify", Buttons:=vbOKCancel)
'this is where I need to allow the user to go activate a chart
'in another workbook, and then come back and click OK.
If ans = vbOK Then
Set ch = ActiveChart
If ch Is Nothing Then
MsgBox "no chart selected"
Else
'chart okay; more code here
End If
Else
'user canceled out
End If

Thanks in advance for your help,
Andrew

 
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
Help with InputBox and MsgBox Preschool Mike Excel Discussion (Misc queries) 9 April 14th 10 06:23 PM
Help with InputBox and MsgBox Ann New Users to Excel 2 April 11th 07 03:46 PM
msgbox / inputbox etc samenvoegen van sheets Excel Discussion (Misc queries) 2 March 16th 06 08:56 AM
Wait for user to change data after msgbox ???? CanadianTrev Excel Discussion (Misc queries) 1 June 18th 05 08:27 PM
Inputbox() Sum() MsgBox() Nigel Excel Programming 1 August 25th 04 06:20 PM


All times are GMT +1. The time now is 07:52 AM.

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"