how to write code outside the VBE

tony567

Well-known Member
Joined
Aug 23, 2008
Messages
515
hello, is it possible to write code line outside the VBE?

for example, i write msgbox("hello word") in cell A1 and then i press enter or push a command button and then excel do something like when i code msgbox("hello world")

>>>just imagine something like this

Code:
sub test()
excecute range("A1").text
end sub



thank you
 
Last edited:

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
you have to create a custom function

thanks for your respond villy, the above sample using msgbox is just an example.

it could be another routine that's not using msgbox

A1: range("B1").text = 1

Code:
sub test()
excecute range("A1").text
end sub
 
Upvote 0
You would have to have code that took the code in the cell and added it to a module, or if you really want to do that sort of thing, you could use the old XLM language and macro sheets. Can't imagine why you would want to, though.
 
Upvote 0
You would have to have code that took the code in the cell and added it to a module, or if you really want to do that sort of thing, you could use the old XLM language and macro sheets. Can't imagine why you would want to, though.

thanks rorya,

mmmhh, any simple code to get me starting at this posibility?
 
Upvote 0
Lots here. Far more trouble than it's worth, IMO.
 
Upvote 0

Forum statistics

Threads
1,224,519
Messages
6,179,263
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top