PDA

View Full Version : adding references in VBA



j_r_auden
14th Feb 2005, 11:04 pm
I have a VBA macro which tags each line on the screen with a block. The block has 2 attributes; size and length. Also, each one of these tags has a seperate attribute reference.

So here are my questions.

1. Is there any way to keep a macro running. Here's my problem. I have a counter that I use an attribute reference counter. It is incremented after each insertion of my block. My program tags all the lines, but if I draw another line and then tag that one, the attribute reference counter will be correct because the macro is no longer running. Is there any way to remedy this ???

2. If I run my macro, and then copy one of my blocks, will the copy have a new attribute reference ?? If so how do I know what the reference is ??

hendie
14th Feb 2005, 11:27 pm
I'm sorry, I've read and reread what you have written but I cannot make sense of it.


The block has 2 attributes; size and length. Also, each one of these tags has a seperate attribute reference.
a block has 2 attributes ~ ok ~ but you've lost me on the rest.


Is there any way to keep a macro running.
Yes various methods


I have a counter that I use an attribute reference counter. It is incremented after each insertion of my block. My program tags all the lines, but if I draw another line and then tag that one, the attribute reference counter will be correct because the macro is no longer running. Is there any way to remedy this ???
eh do you mean incorrect ?
Consistency of approach. if you write a code to do one thing, then you go and do another, how is the code going to know ? unless you code for it.
anytime you start the macro, you gather all the existing data, check it and get the highest number or whatever it is you are looking for


If I run my macro, and then copy one of my blocks, will the copy have a new attribute reference ??

Perhaps I don't understand what you are trying to do here but it looks like you are missing the point of blocks. Or are you talking about the attributes textstring ?