crazybass2 Wrote:
Desert,
From you initial post I thought you wanted this action to occur when
data
was pasted into the cells. It appears now that you what this action to
occur
only when "aTest()" is run. The code is basically the same, but you
need to
remove the intersect statement.
Assuming that "aTest()" is in the Sheet module for the sheet in
question....
Sub aTest()
Dim rng As Range
For Each rng in Range("D3:BD3")
If rng < "" Then Columns(rng.Column).Hidden = False
Next rng
'The rest of your code goes here
End Sub
That should do it. If "aTest()" is in another module some modification
will
need to be done, let me know where it is and what sheet you are
modifying if
this is the case
MikeHi Mike,
I'm really sorry about the confusion.
It pasted it into my "aTest()" and it is working good, at this point.
I have to go to a meeting but will test some more tonight, but i see no
problems.
"aTest()" is in a general module and is called from another macro in
the same module.
The first Macro is called from a text box on "Sheet6".
The first code copys data from a open workbook then pastes to
"Sheet6".
"aTest()" reformats the area where the paste was done on "Sheet6".
Thank you very much for your knowledge & help.
--
Desert Piranha
------------------------------------------------------------------------
Desert Piranha's Profile:
http://www.excelforum.com/member.php...o&userid=28934
View this thread:
http://www.excelforum.com/showthread...hreadid=560574