By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,421 Members | 1,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,421 IT Pros & Developers. It's quick & easy.

Open and eidt macro in code

P: n/a
How can I open a macro so it can be edited in code from a button click?
Assuming I can, will this be able to be done in an mde application.

dixie
Feb 15 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a
On Wed, 15 Feb 2006 12:16:19 +1100, "Dixie" <di***@dogmail.com> wrote:

There are probably better ways. What are you really trying to
accomplish?

-Tom.

How can I open a macro so it can be edited in code from a button click?
Assuming I can, will this be able to be done in an mde application.

dixie


Feb 15 '06 #2

P: n/a
To give end users the ability to open a macro in design view and add, remove
queries, lines in the macro, etc. Access would be by password protected
form.

dixie

"Tom van Stiphout" <no*************@cox.net> wrote in message
news:jn********************************@4ax.com...
On Wed, 15 Feb 2006 12:16:19 +1100, "Dixie" <di***@dogmail.com> wrote:

There are probably better ways. What are you really trying to
accomplish?

-Tom.

How can I open a macro so it can be edited in code from a button click?
Assuming I can, will this be able to be done in an mde application.

dixie

Feb 15 '06 #3

P: n/a
I suppose you could saveastext the macro, load the text into whatever
to edit it, save the changes, and loadfromtext the macro back.A
sophisticated and knowledgeable user would screw this up no more then
95% of the time. You could maybe improve this to 50% by munging the
text into a recordset (one line to each record) and using a continuous
form for the editing. But you can't saveastext in an mde TTBOMK.

BTW the whole notion sounds totally wacko-nuts to me. Better prepare an
escape route in case a van and guys/gals in white coats drives up in
front of your place.

Feb 15 '06 #4

P: n/a
I saw that van go by not 15 minutes ago. I thought they'd come for the
nutcase next door. You mean they're looking for me. :-)

"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
I suppose you could saveastext the macro, load the text into whatever
to edit it, save the changes, and loadfromtext the macro back.A
sophisticated and knowledgeable user would screw this up no more then
95% of the time. You could maybe improve this to 50% by munging the
text into a recordset (one line to each record) and using a continuous
form for the editing. But you can't saveastext in an mde TTBOMK.

BTW the whole notion sounds totally wacko-nuts to me. Better prepare an
escape route in case a van and guys/gals in white coats drives up in
front of your place.

Feb 15 '06 #5

P: n/a
On Wed, 15 Feb 2006 15:44:53 +1100, "Dixie" <di***@dogmail.com> wrote:

You still didn't say what you're really trying to accomplish, or
better what those macros would be used for.

If your users are smart enough to be able to edit macros, give them
access to the macro design view. Of course this precludes MDE.
If not, create an interface for them to accomplish the higher-level
task.

-Tom.
To give end users the ability to open a macro in design view and add, remove
queries, lines in the macro, etc. Access would be by password protected
form.

dixie

"Tom van Stiphout" <no*************@cox.net> wrote in message
news:jn********************************@4ax.com.. .
On Wed, 15 Feb 2006 12:16:19 +1100, "Dixie" <di***@dogmail.com> wrote:

There are probably better ways. What are you really trying to
accomplish?

-Tom.

How can I open a macro so it can be edited in code from a button click?
Assuming I can, will this be able to be done in an mde application.

dixie


Feb 15 '06 #6

P: n/a
That is what I wanted to do - give them access to the design view, but it is
an mde, so I pbviously can't do that. It is not all users, there is one
admin at each site who would be able to do this, hence the idea of a
password. I think I have gone cold on the idea anyway, because it is
probably too much access for the site anyway. Thanks for your help Tom, you
have told me what I need to know anyway.

dixie.

"Tom van Stiphout" <no*************@cox.net> wrote in message
news:rf********************************@4ax.com...
On Wed, 15 Feb 2006 15:44:53 +1100, "Dixie" <di***@dogmail.com> wrote:

You still didn't say what you're really trying to accomplish, or
better what those macros would be used for.

If your users are smart enough to be able to edit macros, give them
access to the macro design view. Of course this precludes MDE.
If not, create an interface for them to accomplish the higher-level
task.

-Tom.
To give end users the ability to open a macro in design view and add,
remove
queries, lines in the macro, etc. Access would be by password protected
form.

dixie

"Tom van Stiphout" <no*************@cox.net> wrote in message
news:jn********************************@4ax.com. ..
On Wed, 15 Feb 2006 12:16:19 +1100, "Dixie" <di***@dogmail.com> wrote:

There are probably better ways. What are you really trying to
accomplish?

-Tom.
How can I open a macro so it can be edited in code from a button click?
Assuming I can, will this be able to be done in an mde application.

dixie

Feb 15 '06 #7

P: n/a
"Dixie" <di***@dogmail.com> wrote in
news:43******@duster.adelaide.on.net:
That is what I wanted to do - give them access to the design view,
but it is an mde, so I pbviously can't do that. It is not all
users, there is one admin at each site who would be able to do
this, hence the idea of a password. I think I have gone cold on
the idea anyway, because it is probably too much access for the
site anyway. Thanks for your help Tom, you have told me what I
need to know anyway.


Tell us what your macro does, and then we can give you a code-based
equivalent that will be dynamic, and obviate any need for the users
to edit the design of the macro or code.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Feb 16 '06 #8

P: n/a
Ted
I think what the guys are saying Dixie, is that perhaps it would be
better to create a form for the users to select options, then run VBA
code that would perform the functions and build a dynamic SQL string
that would perform the commands selected.
I use the capability to perform complex searches of data. The user
selects several fields to search in, each field can be "Like", "Exact
Match", or "Starts With" or "Ends With" and the sort orders (Ascending
or Descending). A lot of code when you create it, but it works really
fast and the users like the flexability of selecting one or multiple
fields to search in.
Use the power of VBA!

Feb 16 '06 #9

P: n/a
Thanks Ted, I appreciate what you are saying. I have decided at this stage,
not to do this anyway, but if I do, I will do as you say. Granting access to
people at that level is a little dangerous. Thanks to all those who pointed
out the lack of wisdom in doing this.

dixie

"Ted" <be*****@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I think what the guys are saying Dixie, is that perhaps it would be
better to create a form for the users to select options, then run VBA
code that would perform the functions and build a dynamic SQL string
that would perform the commands selected.
I use the capability to perform complex searches of data. The user
selects several fields to search in, each field can be "Like", "Exact
Match", or "Starts With" or "Ends With" and the sort orders (Ascending
or Descending). A lot of code when you create it, but it works really
fast and the users like the flexability of selecting one or multiple
fields to search in.
Use the power of VBA!

Feb 16 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.