View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.misc
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Excel macro - VBA code query

Garry

Many thanks for all your efforts. I can supply the other macros code
but
what really puzzles me is why this is becoming so very complicated?


Well it's a rather simple task IMO, but I suspect that (as you state
below) your limited knowledge of VB is the major issue. Post your other
macro code -OR- upload your file to a public share and post a download
link so I can edit it and return to you.

At present, I simply go (manually) to the appropriate cells in Col G
(starting with G3) and invoke the Copy_Title macro using the shortcut
Ctrl + T. Having now created another macro which can go to the cells
in
question, why is it not possible to make it similarly run the macro
in
each cell?


I suspect your code operates on the premise the target cell is the
active cell. Since your loop changes the target cell each iteration,
your code needs to ref the next cell to act on.

My code requires no cells be selected as doing so generally results
inefficient performance.

Sorry if this is a stupid question but, as you can tell, my knowledge
of
VB is fairly limited!

Thanks for your patience.


Always glad to help...

By the way, I totally agree with you about running the loop to row 3
(ie
cell G3) but I find that the macro still also operates on the cell in
which the cursor starts - whatever row or column it's in. Hence my
probably rather heavy-handed "Range("G3").Select" to try and overcome
this problem.


This absolutely does not happen with my test data, using my code 'as
posted'.

V


--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion