Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl
 
Posts: n/a
Default Having a Macro Prompt Me For Input



I have this macro:

Sub temp()

Range("B19").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
ActiveWorkbook.Names.Add Name:="NameOfWorksheetHere", RefersToR1C1:= _
"='throttling 01102005'!R19C2:R115C6"
End Sub

Is it possible to have the macro prompt me to enter the name for
"NameOfWorksheetHere" ?

Thank you in advance.
Was this post helpful to you?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl
 
Posts: n/a
Default Having a Macro Prompt Me For Input

Thank you. I modd'ed my macro to this.

Now I would like this marco to run on each selected worksheet. I selcted my
worksheets but the macro stalled on the last line.

How can I have this macro repeat for each selected worksheet ?

Thank you again.

"Don Guillett" wrote:

have a look in vba help for INPUT BOX

--
Don Guillett
SalesAid Software

"carl" wrote in message
...


I have this macro:

Sub temp()

Range("B19").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
ActiveWorkbook.Names.Add Name:="NameOfWorksheetHere", RefersToR1C1:= _
"='throttling 01102005'!R19C2:R115C6"
End Sub

Is it possible to have the macro prompt me to enter the name for
"NameOfWorksheetHere" ?

Thank you in advance.
Was this post helpful to you?





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett
 
Posts: n/a
Default Having a Macro Prompt Me For Input

I'm still not sure of exactly what you want. A complete explanation might be
helpful.

You do not need to make selections to most things.

Range("B19").End(xlDown).End(xlToRight).select

Why are you selecting the cell when you are naming another cell?
I assume that the worksheet is a different worksheet.

Sub AddNamewithinputbox()
wsname = InputBox("Enter Worksheet Name")
Names.Add Name:="don", RefersTo:="=" & wsname & "!b2"
End Sub

--
Don Guillett
SalesAid Software

"carl" wrote in message
...
Thank you. I modd'ed my macro to this.

Now I would like this marco to run on each selected worksheet. I selcted
my
worksheets but the macro stalled on the last line.

How can I have this macro repeat for each selected worksheet ?

Thank you again.

"Don Guillett" wrote:

have a look in vba help for INPUT BOX

--
Don Guillett
SalesAid Software

"carl" wrote in message
...


I have this macro:

Sub temp()

Range("B19").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
ActiveWorkbook.Names.Add Name:="NameOfWorksheetHere", RefersToR1C1:=
_
"='throttling 01102005'!R19C2:R115C6"
End Sub

Is it possible to have the macro prompt me to enter the name for
"NameOfWorksheetHere" ?

Thank you in advance.
Was this post helpful to you?







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
Macro to Prompt for File -- Neophite Needs HELP kilo1990 Excel Discussion (Misc queries) 13 December 17th 05 10:34 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
How to CANCEL file SAVE PROMPT when MACRO is running? Stuart Macro Muppet Excel Discussion (Misc queries) 3 August 11th 05 12:26 PM
How do I insert a prompt into an Excel macro? TangoHammer Excel Discussion (Misc queries) 1 August 4th 05 09:31 PM
Prompt for file name in a macro Louisville Cardinals Excel Discussion (Misc queries) 11 April 19th 05 02:39 PM


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