D
davegb
The following is giving me a "block variable not set" error where I've
marked:
Sub ChngHeader()
Dim rOldHds As Range
Dim rCell As Range
Dim strOldHd As String
Dim strNewHd As String
Dim lEndRow As Long
Dim wbkNewHdr As Workbook
Set wbkNewHdr = Workbooks("Personal.xls")
Set wbkData = ActiveWorkbook
ActiveSheet.Range("A1").Select
Set rTtl = Range(Selection, Selection.End(xlToRight))
Set rfoundhd = rTtl.Find("stcounty", LookIn:=xlValues)
rfoundhd.Value = "County of Inv"<--ERR0R
rfoundhd is publicly declared as a range. Any ideas?
Thanks!
marked:
Sub ChngHeader()
Dim rOldHds As Range
Dim rCell As Range
Dim strOldHd As String
Dim strNewHd As String
Dim lEndRow As Long
Dim wbkNewHdr As Workbook
Set wbkNewHdr = Workbooks("Personal.xls")
Set wbkData = ActiveWorkbook
ActiveSheet.Range("A1").Select
Set rTtl = Range(Selection, Selection.End(xlToRight))
Set rfoundhd = rTtl.Find("stcounty", LookIn:=xlValues)
rfoundhd.Value = "County of Inv"<--ERR0R
rfoundhd is publicly declared as a range. Any ideas?
Thanks!