Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Newbie: How to open chart on cell click?

Is it possible to programmatically create and open a chart when I click on a
cell in a spreadsheet? The value of the cell to be clicked will be
calculated from an array of values in another sheet in the workbook. When I
click the cell, I want to create a chart that shows a graph of the values
that the clicked cell represents. I know how to open the vba editor, but
how do I assign code to a cell? I don't want to use a User Form - I just
want to click a cell in the spreadsheet and create a chart - can this be
done?

Thanks in advance.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Newbie: How to open chart on cell click?

The Worksheet_SelectionChange event occurs whenever the user selects a new
cell (or range), so you can use it to detect the "click" on the cell - for
example, the code below detects a click into cell C5:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Address = Range("C5").Address Then

'Create your chart

End If

End Sub

"deko" wrote:

Is it possible to programmatically create and open a chart when I click on a
cell in a spreadsheet? The value of the cell to be clicked will be
calculated from an array of values in another sheet in the workbook. When I
click the cell, I want to create a chart that shows a graph of the values
that the clicked cell represents. I know how to open the vba editor, but
how do I assign code to a cell? I don't want to use a User Form - I just
want to click a cell in the spreadsheet and create a chart - can this be
done?

Thanks in advance.



Reply
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
Click on cell to take you to chart BStrandberg Excel Discussion (Misc queries) 1 December 29th 09 09:39 PM
How do I create a click on + symbol to open a root and click on -. changeyourbodychallenge.com Excel Discussion (Misc queries) 1 December 28th 09 03:22 PM
Click on cell to open another workbook dsimpson Excel Discussion (Misc queries) 1 September 17th 08 05:01 PM
Newbie needs help in VBA ;creating a click() function david2004[_2_] Excel Programming 2 January 9th 04 01:57 PM
click cell and open matching value in next sheet paul Excel Programming 2 November 19th 03 06:54 AM


All times are GMT +1. The time now is 02:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"