![]() |
prompt for input while macro running
Using Excel 2000. I am trying to create a macro to cut information from an open worksheet and insert that information into another worksheet within the same workbook. I can't figure out how to get the macro to prompt me for which worksheet I want to insert the information into.
|
prompt for input while macro running
Hi,
Try to use an inputbox : strWorksheet = InputBox("Please enter the name of the worksheet t paste :" -- Message posted from http://www.ExcelForum.com |
prompt for input while macro running
You can use Inputbox to get information from the user.
If you use Application.Inputbox (this is different) with a Type value of 8, the user input can be a range, so you could ask them to activate the workbook and worksheet to insert into. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "mmcintire" wrote in message ... Using Excel 2000. I am trying to create a macro to cut information from an open worksheet and insert that information into another worksheet within the same workbook. I can't figure out how to get the macro to prompt me for which worksheet I want to insert the information into. |
prompt for input while macro running
See if this works:
Sub Test() Dim R As Range Dim Msg As String Msg = "Yo da man" On Error Resume Next Set R = Application.InputBox( _ "Click where you want the message:", _ Type:=8) If R Is Nothing Then Exit Sub R.Value = Msg End Sub -- HTH. Best wishes Harald Followup to newsgroup only please "mmcintire" skrev i melding ... Using Excel 2000. I am trying to create a macro to cut information from an open worksheet and insert that information into another worksheet within the same workbook. I can't figure out how to get the macro to prompt me for which worksheet I want to insert the information into. |
All times are GMT +1. The time now is 11:44 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com