Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Copy named range contents to activecell position

Hi


I have a dynamic named range "Shift1". I would appreciate some code that I
can assign to a button that will copy the contents of the named range to the
active cell position.

TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Copy named range contents to activecell position

Neal,
Named ranges can be available to the entire workbook or they can be
worksheet specific.

If the name is at the workbook level:
Sub Shift1()
ActiveCell.Value = Range("rngShift1").Value
End Sub

If it is worksheet specific, this is prefered:
Sub Shift1()
ActiveCell.Value = Worksheets("Sheet 1").Range("rngShift1").Value
End Sub

Dale Preuss

"Neal" wrote:

Hi


I have a dynamic named range "Shift1". I would appreciate some code that I
can assign to a button that will copy the contents of the named range to the
active cell position.

TIA

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy named range contents to activecell position

Private Sub CommandButton1_Click()
Range("Shift1").copy Destination:=ActiveCell
End Sub

--
Regards,
Tom Ogilvy

"Neal" wrote in message
...
Hi


I have a dynamic named range "Shift1". I would appreciate some code that I
can assign to a button that will copy the contents of the named range to

the
active cell position.

TIA



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
copy contents of a named range to a section on working area Steve Excel Discussion (Misc queries) 1 May 22nd 09 10:36 PM
Finding if the activecell is withing a named range Seamus Conlon Excel Programming 8 August 28th 04 12:10 AM
How to get the position of a cell in Excel named range? Kalpesh Shah Excel Programming 0 July 10th 03 09:07 AM
How to get the position of a cell in Excel named range? [email protected] Excel Programming 0 July 10th 03 03:14 AM
How to get the position of a cell in Excel named range? acw Excel Programming 0 July 10th 03 02:57 AM


All times are GMT +1. The time now is 10:52 PM.

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"