Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Insert a Range name

Can anyone tell me how to insert a range name using code.
What I am tring to do is find a cell then activate that
cell to call it by name for future use in my macro.

here what I am tring.

Cells.Find(What:="Cad Totals:", After:=ActiveCell,
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, MatchCase:=False).Activate
ActiveCell.Names.Add Name:="CadT"

Cells.Find(What:="Totals in usd:", After:=ActiveCell,
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, MatchCase:=False).Activate
ActiveCell.Range("A1:D1").Select
ActiveWorkbook.Names.Add Name:="USTotal"

thanks
Pete
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Insert a Range name

ActiveCell.Name = "abc"

--
Jim Rech
Excel MVP


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert value based on range GL Excel Worksheet Functions 3 October 29th 08 09:04 PM
Auto insert a range fastballfreddy Excel Discussion (Misc queries) 1 May 9th 06 12:41 AM
Insert...Name Range childofthe1980s Excel Discussion (Misc queries) 1 May 24th 05 03:52 PM
insert row and range changes problem? ljb[_2_] Excel Programming 2 November 14th 03 09:19 PM
Insert SUM function for range Denis Petrov Excel Programming 3 October 21st 03 06:44 PM


All times are GMT +1. The time now is 10:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"