Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Howdee all.
I just recorded a macro to strip off the path to a template document, for some formulas. The recorded code is: Sub extractMe() Cells.Replace What:= _ "C:\Documents and Settings\UserName\Application _ Data\Microsoft\Templates\[TR Claim Book.xltx]" _ , Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:= _ False, SearchFormat:=False, ReplaceFormat:=False End Sub I just tried placing it in a for loop, and I cannot get it to work right. I keep getting a 438 error. My throughts we Dim MyCell as range For each MyCell in ActiveSheet ' "replace" code from above next What code do I use for a loop that will just run through the single page-- I want to remove all of the template pathways that exist-- varies from 2 or 3 up to around 10 instances. Thank you. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Loop | Excel Programming | |||
Do until loop with use of another macro in loop | Excel Programming | |||
loop a macro | Excel Discussion (Misc queries) | |||
VBA Macro Loop | Excel Programming | |||
Do...Loop Macro | Excel Programming |