VBE - code duplication concern...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello everyone,

I have successfully writen a data import script that appends excel data to
an exisiting table. I wrote the script to operate on the button-click event
for a command button. When navigating my code in the VBE, I notice that the
code is duplicated in different form objects, which it shouldn't be. I would
like to only view the vba code that corresponds to the form I am working
with, or intend to be working with.

Is there a view-setting in the VBE that will accomplish this?
 
Hello everyone,

I have successfully writen a data import script that appends excel data to
an exisiting table. I wrote the script to operate on the button-click event
for a command button. When navigating my code in the VBE, I notice that the
code is duplicated in different form objects, which it shouldn't be. I would
like to only view the vba code that corresponds to the form I am working
with, or intend to be working with.

Is there a view-setting in the VBE that will accomplish this?

Doesn't sound like a view-setting problem. Sounds like a coding
issue..

If you reuse the exact same chunk of code over and over, why not just
take the whole thing, put it in it's own function/sub and then include
arguments so you can call it from anywhere?
 
The only options are for the current module or the current procedure. You
can only see other modules by changing windows in the VBA editor. I don't
really know what it is you think you are seeing.
 
Back
Top