naming a range in excel

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
 
D

Dianne

This works for me:

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

In
 
T

Tom Ogilvy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top