LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Worksheet Name RefersTo

I'm trying to select a range of cells and name them based on the name
of the worksheet

Sub NameBlock()
myLastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
myLastCol = ActiveSheet.Cells(2, Columns.Count).End(xlToLeft).Column
ThisWorkbook.Names.Add Name:=Worksheets(1).Name + "_total", _
RefersTo:="=$A$2:"&myLastRow, &myLastCol, Visible:=True
End Sub

Something is wrong
 
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
issue with RefersTo in non-EN languages scoober Excel Programming 0 August 28th 07 02:32 PM
refersTo property Dev Excel Programming 0 May 18th 06 09:21 PM
Help building string for Names.Add RefersTo, pls? Ed Excel Programming 10 April 7th 05 05:00 PM
Wierd named range RefersTo value chris Excel Programming 1 May 21st 04 04:40 PM
Wierd named range RefersTo value Bob Phillips[_6_] Excel Programming 0 May 21st 04 04:32 PM


All times are GMT +1. The time now is 12:14 PM.

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

About Us

"It's about Microsoft Excel"