Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Go to named range nominated by user

Hi
I'm a novice macro user - I apologise in advance.

In Office 2007 excel I want to create a macro that:-

1. Creates a msg book and asks the user to enter a named range e.g. "Nov_09"
2. Go to that named range on the current worksheet
3. Copy and paste values within that named range
End.

I searched past threads but I couldn't find anything that deals with a user
nominating the named range.

--
Thank for your help
BeSmart
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Go to named range nominated by user

Try the below macro which works on the active sheet. Edit the destination
cell to suit your requirement

Sub Macro()
Dim strNamedRange As String

strNamedRange = InputBox("Enter the named range")
If strNamedRange < "" Then
Range(strNamedRange).Copy Range("G1")
End If

End Sub


--
Jacob


"BeSmart" wrote:

Hi
I'm a novice macro user - I apologise in advance.

In Office 2007 excel I want to create a macro that:-

1. Creates a msg book and asks the user to enter a named range e.g. "Nov_09"
2. Go to that named range on the current worksheet
3. Copy and paste values within that named range
End.

I searched past threads but I couldn't find anything that deals with a user
nominating the named range.

--
Thank for your help
BeSmart

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Go to named range nominated by user

That worked brilliantly - Thanks heaps.
--
BeSmart


"Jacob Skaria" wrote:

Try the below macro which works on the active sheet. Edit the destination
cell to suit your requirement

Sub Macro()
Dim strNamedRange As String

strNamedRange = InputBox("Enter the named range")
If strNamedRange < "" Then
Range(strNamedRange).Copy Range("G1")
End If

End Sub


--
Jacob


"BeSmart" wrote:

Hi
I'm a novice macro user - I apologise in advance.

In Office 2007 excel I want to create a macro that:-

1. Creates a msg book and asks the user to enter a named range e.g. "Nov_09"
2. Go to that named range on the current worksheet
3. Copy and paste values within that named range
End.

I searched past threads but I couldn't find anything that deals with a user
nominating the named range.

--
Thank for your help
BeSmart

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Go to named range nominated by user

You are welcome. Thanks for the feedback.

--
Jacob


"BeSmart" wrote:

That worked brilliantly - Thanks heaps.
--
BeSmart


"Jacob Skaria" wrote:

Try the below macro which works on the active sheet. Edit the destination
cell to suit your requirement

Sub Macro()
Dim strNamedRange As String

strNamedRange = InputBox("Enter the named range")
If strNamedRange < "" Then
Range(strNamedRange).Copy Range("G1")
End If

End Sub


--
Jacob


"BeSmart" wrote:

Hi
I'm a novice macro user - I apologise in advance.

In Office 2007 excel I want to create a macro that:-

1. Creates a msg book and asks the user to enter a named range e.g. "Nov_09"
2. Go to that named range on the current worksheet
3. Copy and paste values within that named range
End.

I searched past threads but I couldn't find anything that deals with a user
nominating the named range.

--
Thank for your help
BeSmart

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
Modify to only work with nominated range instead of entire sheet Corey Excel Programming 1 October 20th 08 04:41 AM
Pass named range to user defined function returns #value! Bob Phillips Excel Programming 0 November 10th 07 11:56 AM
Nominated range not recognised in User Defined Funtion Matt Roberts Excel Programming 1 January 25th 06 12:18 PM
Passing a named range into a user defined function Simon Shaw Excel Programming 2 March 15th 05 09:33 PM
passing named range to a UDF user defined function Brian Murphy Excel Programming 3 June 13th 04 08:38 PM


All times are GMT +1. The time now is 03:19 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"