Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am using the inputbox to get a user to pick a cell on a worksheet and am having trouble trapping a Cancel event or when the user clicks OK without making a selection Set rng = Application.InputBox(Msg1, Title1, Type:=8) Please note that rng is dimmed as an object |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Try something like Dim R As Range On Error Resume Next Set R = Application.InputBox(prompt:="hello", Type:=8) If R Is Nothing Then Debug.Print "cancelled" Else Debug.Print R.Address End If Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2009 Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Tue, 10 Feb 2009 10:15:02 -0800, Rafi wrote: Hi, I am using the inputbox to get a user to pick a cell on a worksheet and am having trouble trapping a Cancel event or when the user clicks OK without making a selection Set rng = Application.InputBox(Msg1, Title1, Type:=8) Please note that rng is dimmed as an object |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Error Resume Next
Set rng = Application.InputBox(Msg1, Title1, Type:=8) On Error GoTo 0 If Not rng Is Nothing Then 'process it End If -- __________________________________ HTH Bob "Rafi" wrote in message ... Hi, I am using the inputbox to get a user to pick a cell on a worksheet and am having trouble trapping a Cancel event or when the user clicks OK without making a selection Set rng = Application.InputBox(Msg1, Title1, Type:=8) Please note that rng is dimmed as an object |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with Application.InputBox(,,,,,8) | Excel Programming | |||
Application inputbox, Range versus Cancel | Excel Programming | |||
Copy a range with application.inputbox | Excel Programming | |||
Inputbox and Application.InputBox | Excel Programming | |||
application.inputbox | Excel Programming |