ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Prompt for Value (https://www.excelbanter.com/excel-programming/316959-prompt-value.html)

halem2[_51_]

Prompt for Value
 

Hi:

I have the following code wich clears the cell value depending on th
number selected. In this case is number 6.

Sub DeleteRow()
Range("A1").Select
Do
If Application.IsText(ActiveCell) = "6" Then
ActiveCell.ClearContents
Application.a
Else
ActiveCell.ClearContents
ActiveCell.Offset(1, 0).Select
End If
Loop Until ActiveCell = ""
End Sub

How can I promt the user with a pop up window and use whatever the use
types as the value?

thanks a million in advance! :confused

--
halem
-----------------------------------------------------------------------
halem2's Profile: http://www.excelforum.com/member.php...nfo&userid=993
View this thread: http://www.excelforum.com/showthread.php?threadid=31376


Bob Phillips[_6_]

Prompt for Value
 
Sub DeleteRow()
Range("A1").Select
Do
ans = Inputbox ("Input number please")
if and < "" Then
If IsNumeric(ans) Then
If Application.IsText(ActiveCell) = ans Then
ActiveCell.ClearContents
Application.a
Else
ActiveCell.ClearContents
ActiveCell.Offset(1, 0).Select
End If
End If
End If
Loop Until ActiveCell = ""
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"halem2" wrote in message
...

Hi:

I have the following code wich clears the cell value depending on the
number selected. In this case is number 6.

Sub DeleteRow()
Range("A1").Select
Do
If Application.IsText(ActiveCell) = "6" Then
ActiveCell.ClearContents
Application.a
Else
ActiveCell.ClearContents
ActiveCell.Offset(1, 0).Select
End If
Loop Until ActiveCell = ""
End Sub

How can I promt the user with a pop up window and use whatever the user
types as the value?

thanks a million in advance! :confused:


--
halem2
------------------------------------------------------------------------
halem2's Profile:

http://www.excelforum.com/member.php...fo&userid=9930
View this thread: http://www.excelforum.com/showthread...hreadid=313764





All times are GMT +1. The time now is 06:10 AM.

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