Code automation

Henri Feuga

New Member
Joined
Mar 8, 2014
Messages
1
I am storing various type of codes in memory variables and would like to execute them as a command line.

I have tried to create on the fly procedures, which works, but it requires my project to not be protected.

Is there a way to execute a variable as a command as follows:

********************************

dim temp as string

quote = chr(34)

' This could be any VBA code
temp = "sheets(" & quote & "Temp" & ").Image1.picture" & "= LoadPicture("")"

call exec_code(code_string)

sub exec_code(code_string)

application.run temp ' I know this does not work but I am looking for something similar
end sub
********************************
 

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