Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to run code written inside a cell, for example, cell A1
I wrote MsgBox "Hi i am David" When I run the code it has show the message Hi i am David or else order written in A1 any help appreciated in advance. thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Your example does not have any code written inside a cell, so hard to know what you want. If you want to show the text in A1 in a msgbox you could use Function ShowIt(myCell as Range) as Variant ShowIt = MsgBox(myCell.Value) End function and run the sub Sub RunShowIt() ShowIt Range("A1") End Sub If you really want to run code that is in A1 you will need to run a sub which starts the code, which begs the question of why not put the code in A1 into the original sub in the first place? regards Paul On Apr 27, 8:27*am, EXCEL_LOVER wrote: Is it possible to run code written inside a cell, for example, cell A1 I wrote MsgBox "Hi i am David" When I run the code it has show the message Hi i am David or else order written in A1 any help appreciated in advance. thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create .NET components written in C# inside Excel Macro | Excel Discussion (Misc queries) | |||
using the name of a worksheet written in a cell, inside a formula | Excel Worksheet Functions | |||
Running VBA Code not written within the currrent worksheet | Excel Programming | |||
Programmely written code don't work | Excel Programming | |||
Searching range for value (code written but needs 'tweaking'!) | Excel Programming |