Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Promting for wooksheet name in macro.
I'm trying to get the macro to let me pick the name on the worksheet t
paste the info into. Here's what i have but it gives me an error (run-time error '9' subscript out of range) Help a newbie please! :) Windows("CUP_Results.xls").Activate Sheets("Pro Calc").Select Range("A1:AF100").Select Selection.Copy Sheets(strWorksheet = InputBox("Please enter the name of th worksheet")).Select ActiveSheet.Past -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Promting for wooksheet name in macro.
Hi
not tested but try: Dim target_name Windows("CUP_Results.xls").Activate target_name = InputBox("Please enter the name of theworksheet") Sheets("Pro Calc").Range("A1:AF100").copy Sheets(target_name).paste -- Regards Frank Kabel Frankfurt, Germany I'm trying to get the macro to let me pick the name on the worksheet to paste the info into. Here's what i have but it gives me an error. (run-time error '9' subscript out of range) Help a newbie please! :) Windows("CUP_Results.xls").Activate Sheets("Pro Calc").Select Range("A1:AF100").Select Selection.Copy Sheets(strWorksheet = InputBox("Please enter the name of the worksheet")).Select ActiveSheet.Paste --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Promting for wooksheet name in macro.
Change
Sheets(strWorksheet = InputBox("Please enter the name of the worksheet")).Select to sSheet = InputBox("Please enter the name of the worksheet") if sSheet < "" Then Sheets(sSHeet).Select End If -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Leatherfoot " wrote in message ... I'm trying to get the macro to let me pick the name on the worksheet to paste the info into. Here's what i have but it gives me an error. (run-time error '9' subscript out of range) Help a newbie please! :) Windows("CUP_Results.xls").Activate Sheets("Pro Calc").Select Range("A1:AF100").Select Selection.Copy Sheets(strWorksheet = InputBox("Please enter the name of the worksheet")).Select ActiveSheet.Paste --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Promting for wooksheet name in macro.
Thanks so much guys... I copied your suggestion into the macro Bob and
it worked perfectly. :) --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Promting Text? | Excel Discussion (Misc queries) | |||
excel wooksheet problem | Excel Discussion (Misc queries) | |||
promting a number in cell | Excel Discussion (Misc queries) | |||
how do I print gridlines for Excel wooksheet | Excel Discussion (Misc queries) | |||
How do I build a Macro that can identify wooksheet names | Excel Discussion (Misc queries) |