Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create Named Range in VBA
I would like to highlight a range of cells in my worksheet and then ru a macro that will then create a Named Range using those highlighte cells. I suppose the VBA would be something like: ThisWorkbook.Names.Add Name:="NewName", _ RefersTo:= But I don't know what code is needed next. Can anyone help? Many Thanks, Michae -- michael.a ----------------------------------------------------------------------- michael.a7's Profile: http://www.excelforum.com/member.php...fo&userid=3302 View this thread: http://www.excelforum.com/showthread.php?threadid=55014 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create Named Range in VBA
Hi Michael,
Try: '============= Public Sub Tester() Selection.Name = "YourName" End Sub '<<============= --- Regards, Norman "michael.a7" wrote in message ... I would like to highlight a range of cells in my worksheet and then run a macro that will then create a Named Range using those highlighted cells. I suppose the VBA would be something like: ThisWorkbook.Names.Add Name:="NewName", _ RefersTo:= But I don't know what code is needed next. Can anyone help? Many Thanks, Michael -- michael.a7 ------------------------------------------------------------------------ michael.a7's Profile: http://www.excelforum.com/member.php...o&userid=33027 View this thread: http://www.excelforum.com/showthread...hreadid=550149 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create Named Range in VBA
Thanks Norman :) -- michael.a7 ------------------------------------------------------------------------ michael.a7's Profile: http://www.excelforum.com/member.php...o&userid=33027 View this thread: http://www.excelforum.com/showthread...hreadid=550149 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to create a dynamic named range? | Excel Discussion (Misc queries) | |||
Create named range | Excel Programming | |||
create named range specific to worksheet | Excel Programming | |||
Create a Named Range in Excel with VBA | Excel Programming | |||
Create named range | Excel Programming |