LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default InputBoxes & Ranges

Dear Friends,

I posted this question last week. Although a friend tried to help he
couldn't do so. Sure would oblige if any1 else could help me outta this mess:

I always get into a trouble when referring to a range via an inputbox and a
Cancel button is clicked or it is left Blank. Any suggestions?

Furthermore, what might be wrong with the following code?

Sub CHECK()

Dim FIRST As Range, SECOND As Range, THIRD As Range

Set FIRST = Application.InputBox("FIRST!", , , , , , , 8)
If FIRST.Address = "" Then
Exit Sub
MsgBox "--:" & FIRST.Address & ":--"
End If

Set SECOND = Application.InputBox("SECOND!", , , , , , , 8)
If SECOND.Address = "" Then
Exit Sub
MsgBox "--:" & SECOND.Address & ":--"
End If

Set THIRD = Application.InputBox("THIRD", , , , , , , 8)
If THIRD.Address = "" Then
Exit Sub
MsgBox "--:" & THIRD.Address & ":--"
End If

End Sub

--
Best Regards,

Faraz

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ranges & Inputboxes? Faraz A. Qureshi Excel Programming 4 September 11th 09 09:33 AM
userform and inputboxes pswanie Excel Programming 1 January 3rd 08 04:09 PM
connecting 2 inputboxes and using the autofill Mike Excel Programming 4 September 29th 06 12:37 PM
InputBoxes Sean Excel Programming 2 July 19th 06 06:09 PM
InputBoxes Exceptions ianripping[_42_] Excel Programming 3 April 8th 04 09:34 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"