naming a range in excel

  • Thread starter Thread starter lior03
  • Start date Start date
L

lior03

sub tablenamer
dim x as string
x= inputbox("tablename is
activecell.currentregion.select
selection.currentregion.name
end sub
my question- how can i see the name i have chosen for the range in
"tablename is" - why does the excel name box show x rather
then the name i gave the range?
moshe
 
This works for me:

Sub tablenamer()
Dim x As String
x = InputBox("Enter the table name")
ActiveCell.CurrentRegion.Name = x
End Sub

In
 
sub tablenamer
dim x as string
x = InputBox("Table name is ")
if not x ="" then
Activecell.CurrentRegion.Name = x
End if
ActiveCell.CurrentRegion.Select
end sub

To see the name, look in the name box or do Insert=>Name=>Define
 
Back
Top