ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   inputbox ? (https://www.excelbanter.com/excel-programming/427329-re-inputbox.html)

Dave Peterson

inputbox ?
 
Declare a variable that represents that range. And then use that variable the
way you want.

Dim InputCell as range
dim ck as range

set ck = activesheet.cells(1,3)

Set inputcell = nothing
on error resume next
set inputcell = application.inputbox(Prompt:="dog?", _
title:="Animal", default:=ck.address, type:=8).cells(1)
on error goto 0

if inputcell is nothing then
'user hit cancel
else
msgbox inputcell.address & vblf & inputcell.value
end if




sunilpatel wrote:

i have the following
set ck=cells(1,3)
INPT$ = RTrim(Application.InputBox("dog" & "?", "animal", CK.Address, , , ,
, 8))

when a cell is clicked INPUT$=contents of clicked cell. This is what i want
but i also require the cell address clicked.

Please note Application.ScreenUpdating = False


--

Dave Peterson


All times are GMT +1. The time now is 10:07 PM.

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