Insert colum with 0's
Heck if I know, maybe 3 or 4 spaces (" ") that got into the mix (I might
have screwed around with the code after pasting, but before running..
anyway I
sure do appreciate your help, Bob.
JMay
Virginia, USA
"Bob Phillips" wrote in message
...
Didn't we do well<g.
What's a blue block by the way?
Bob
"JMay" wrote in message
news:w2vSa.2777$If5.412@lakeread06...
OK, I played around with it, deleted out the space occupied by the Blue
Block, and PRESTO, I'm OK; << Another "learning experience"...Thanks
guys
for verifying there wasn't a problem with the code..
"JMay" wrote in message
news:mLuSa.2776$If5.2397@lakeread06...
Tom/Bob:
My Code: After running and getting the Compile Error Sub or Function
not
defined -- Where I've placed the **** below there is actually a full
3
or
4
space Blue Block, which might give a clue as to what's going on;
that's
all
I can offer.
Thanks for taking a look...
Sub InsertColumn()
Dim cRows As Long
cRows = Cells(Rows.Count, "D").End(xlUp).Row
**** Columns("E:E").EntireColumn.Insert
Range("E1:E" & cRows).Value = "0"
End Sub
"Tom Ogilvy" wrote in message
...
Pasted into a general module and it ran fine for me.
Regards,
Tom Ogilvy
JMay wrote in message
news:ScoSa.2767$If5.298@lakeread06...
Bob:
I get Compile error - Sub or Function not defined, when trying
this;
Can
you review and comment on the possibilities??
Tks,
JMay
"Bob Phillips" wrote in message
...
Henrik,
This inserts the column after D
Sub InsertColumn()
Dim cRows As Long
cRows = Cells(Rows.Count, "D").End(xlUp).row
Columns("E:E").EntireColumn.Insert
Range("E1:E" & cRows).Value = "0"
End Sub
--
HTH
-------
Bob Phillips
... looking out across Poole Harbour to the Purbecks
"Henrik Bonde" wrote in message
...
Hi
During execution of a macro converting a *.xls to *.txt, i
need
to
insert a colum containing only zeros.
But it has to be the same length (number of rows), as the
colum
next
to it.
How to?
Best Regards
Henrik Bonde
|