ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   stop for input (https://www.excelbanter.com/excel-programming/381170-stop-input.html)

Curt

stop for input
 
have the following macro built with excel want to stop in (A2) to enter text
then return to M132. This is test range to establish function Have (A2)
formated for given amount of text. Not sure of code to allow text entry Runs
thru without stop.
Thanks


Range("N132").Select
Sheets("Desc").Select
Range("A2").Select

ActiveCell.FormulaR1C1 = ""
Range("A2").Select
Selection.Cut
Sheets("Data").Select
Range("M132").Select
ActiveSheet.Paste
End Sub

Gary Keramidas

stop for input
 
i really don't know what you're trying to do, but i'll throw this out as an
idea. probably a better way if you clarify things a little

Sub test2()
Dim nval As Long
With Worksheets("data")
nval = Application.InputBox("Enter Number", "What Number",
Type:=1)
With Worksheets("Desc").Range("A2")
.Value = nval
.Cut
End With
.Activate
.Range("M132").Select
.Paste
End With
End Sub



--


Gary


"Curt" wrote in message
...
have the following macro built with excel want to stop in (A2) to enter text
then return to M132. This is test range to establish function Have (A2)
formated for given amount of text. Not sure of code to allow text entry Runs
thru without stop.
Thanks


Range("N132").Select
Sheets("Desc").Select
Range("A2").Select

ActiveCell.FormulaR1C1 = ""
Range("A2").Select
Selection.Cut
Sheets("Data").Select
Range("M132").Select
ActiveSheet.Paste
End Sub




Curt

stop for input
 
closer exam your idea. Is there a way the control amount that is entered into
the input box. need to have 6 rows with 39 letters wide. This will fit into
my 3x5 cards that I need to print info onto. This procedure you offer could
be assigned to each cell of 125 without having to go to second wks.
Thanks


"Gary Keramidas" wrote:

i really don't know what you're trying to do, but i'll throw this out as an
idea. probably a better way if you clarify things a little

Sub test2()
Dim nval As Long
With Worksheets("data")
nval = Application.InputBox("Enter Number", "What Number",
Type:=1)
With Worksheets("Desc").Range("A2")
.Value = nval
.Cut
End With
.Activate
.Range("M132").Select
.Paste
End With
End Sub



--


Gary


"Curt" wrote in message
...
have the following macro built with excel want to stop in (A2) to enter text
then return to M132. This is test range to establish function Have (A2)
formated for given amount of text. Not sure of code to allow text entry Runs
thru without stop.
Thanks


Range("N132").Select
Sheets("Desc").Select
Range("A2").Select

ActiveCell.FormulaR1C1 = ""
Range("A2").Select
Selection.Cut
Sheets("Data").Select
Range("M132").Select
ActiveSheet.Paste
End Sub






All times are GMT +1. The time now is 12:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com