# Microsoft Office Application Help - Excel Help forum > Excel Programming / VBA / Macros >  >  Assign a Macro to a cell

## julvaz

Hello all,

How can I assign a macro to a cell.  What I want to do is be able to, for example, click on cell B2 and have some text appear on cell B10.  Is that possible?  If so can you help, thank you.

----------


## VBA Noob

Hi,

Try an event macro.

Right click the sheet you want the change to happen to then select View Code and paste in the below




```
Please Login or Register  to view this content.
```


more on Event macro's can be found on the attached link

http://www.cpearson.com/excel/events.htm


VBA Noob

----------


## julvaz

> Hi,
> 
> Try an event macro.
> 
> Right click the sheet you want the change to happen to then select View Code and paste in the below
> 
> 
> 
> 
> ...



Thank you so much VBA Noob, that worked perfectly

----------


## DABatPENN

Hello, How do I assign a Macro to a cell that will execute the Insert, Object, Create from File (tab), Display as icon, Browse. And then let a person choose their own file to insert.  

I checked that website you suggested http://www.cpearson.com/excel/Events.aspx and found the Object Browser in the VBA Editor. Then I found File Search in the Classes list. But Im not sure what to choose from the Members of File Search list. Can you help? Am I even in the ballpark? Thanks, db

----------


## royUK

_Your post does not comply with Rule 2 of our Forum_ RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

----------

