help - VBA

L

learning_codes

Hi,

I'm trying to turn the warning message off when I use:

Cells.Replace What:="Z Divisional Totals", Replacement:="Divisional
Totals", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False


Second part is:

Is there a way to check either the column and rows filled to create
border where is pointed to "APPLYBORDER". Your help would be much
apprecated.

r = Range("A10").End(xlDown).Row

ApplyBorder Range("A10", "A" & r)
ApplyBorder Range("B10", "B" & r)
ApplyBorder Range("C10", "C" & r)
ApplyBorder Range("D10", "D" & r)
ApplyBorder Range("E10", "E" & r)
ApplyBorder Range("F10", "F" & r)
ApplyBorder Range("G10", "G" & r)

Thanks..
 
G

GS

(e-mail address removed) pretended :
Hi,

I'm trying to turn the warning message off when I use:

Cells.Replace What:="Z Divisional Totals", Replacement:="Divisional
Totals", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False


Second part is:

Is there a way to check either the column and rows filled to create
border where is pointed to "APPLYBORDER". Your help would be much
apprecated.

r = Range("A10").End(xlDown).Row

ApplyBorder Range("A10", "A" & r)
ApplyBorder Range("B10", "B" & r)
ApplyBorder Range("C10", "C" & r)
ApplyBorder Range("D10", "D" & r)
ApplyBorder Range("E10", "E" & r)
ApplyBorder Range("F10", "F" & r)
ApplyBorder Range("G10", "G" & r)

Thanks..

Try doing this manually while the macro recorder is turned on, and see
what code is generated. Tools>Macro>Record New Macro... in early
versions; in xl2007+ it's Record Macro in the Code section of the
Developer tab.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top