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
********************************
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
********************************