Dear All
I have a sheet "GSVPerc" in an excel workbook. In this sheet there are 50 tables whose names are defined as "GSVTable1", "GSVTable2", "GSVTable3",.........., "GSVTable50".
Now I have created a copy of this sheet in the same workbook. I have renamed this new sheet as "SSVPerc".
Now this sheet "SSVPerc" also have 50 tables with same names as of the tables on sheet "GSVPerc". But the tables on new sheet "SSVPerc" don't have the scope as workbook. Rather they have the scope of that local sheet "SSVPerc". I have to change the name of these 50 tables (on sheet "SSVPerc"). The new names to be given to these tables are "SSVTable1", "SSVTable2", "SSVTable3",.........., "SSVTable50".
I am using following code for this purpose:
Sub NameChange ()
For i = 1 to 50
With sheets("SSVPerc")
.Range("GSVTable" & i).Name= "SSVTable" & i
End With
Next i
End Sub
When I run code it run successfully without any error but it does nothing. No name change take place. I have run this type of code earlier once in some other instance and at that time code was working fine. But this time the code is doing nothing.
Further I have no idea for coding to change the scope of Named Ranges.
Please suggest.
Regards
Brijesh
I have a sheet "GSVPerc" in an excel workbook. In this sheet there are 50 tables whose names are defined as "GSVTable1", "GSVTable2", "GSVTable3",.........., "GSVTable50".
Now I have created a copy of this sheet in the same workbook. I have renamed this new sheet as "SSVPerc".
Now this sheet "SSVPerc" also have 50 tables with same names as of the tables on sheet "GSVPerc". But the tables on new sheet "SSVPerc" don't have the scope as workbook. Rather they have the scope of that local sheet "SSVPerc". I have to change the name of these 50 tables (on sheet "SSVPerc"). The new names to be given to these tables are "SSVTable1", "SSVTable2", "SSVTable3",.........., "SSVTable50".
I am using following code for this purpose:
Sub NameChange ()
For i = 1 to 50
With sheets("SSVPerc")
.Range("GSVTable" & i).Name= "SSVTable" & i
End With
Next i
End Sub
When I run code it run successfully without any error but it does nothing. No name change take place. I have run this type of code earlier once in some other instance and at that time code was working fine. But this time the code is doing nothing.
Further I have no idea for coding to change the scope of Named Ranges.
Please suggest.
Regards
Brijesh