M
Madiya
Hi,
I am trying to set named range by VBA to another workbook.
Dim LR As Integer
Dim I As Integer
Dim J As Integer
Dim WRM As Workbook
Dim SDR As Worksheet
Set WRM = Workbooks("RUIM new.xls")
Set SDR = WRM.Sheets("Damage Receipt")
For I = 1 To 12
ActiveWorkbook.Names.Add Name:=SDR.Cells(1, I).Value, _
RefersTo:=SDR.Range((Cells(1, I)), Cells(20000, I)),
Visible:=True <<<ERROR>>>>
Next
I am getting error on the above statement.
Need help.
Regards,
Madiya
I am trying to set named range by VBA to another workbook.
Dim LR As Integer
Dim I As Integer
Dim J As Integer
Dim WRM As Workbook
Dim SDR As Worksheet
Set WRM = Workbooks("RUIM new.xls")
Set SDR = WRM.Sheets("Damage Receipt")
For I = 1 To 12
ActiveWorkbook.Names.Add Name:=SDR.Cells(1, I).Value, _
RefersTo:=SDR.Range((Cells(1, I)), Cells(20000, I)),
Visible:=True <<<ERROR>>>>
Next
I am getting error on the above statement.
Need help.
Regards,
Madiya