From: EXCEL_LOVER on
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
From: Paul Robinson on
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 <halsaee...(a)gmail.com> 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