NEED MORE INFO, DAVE OR IVAN!!!


Posted by Gina H. on March 12, 2001 2:59 PM

Guys,
I appreciate your quick response, but I can't get them to work. I must be doing something wrong, but I spent most of today trying to add and delete to have the results I need. I am most likely not making myself clear...but what I need is for the macro is actually print the cell references in an equation-like, with parentheses around both and a + sign in the middle. Please show me what I am doing wrong, with instructions. MUCH APPRECIATION!
Gina


In Reply to: Re: Is it possible for macro to pause for cell reference? posted by Dave Hawley on March 11, 2001 at 21:36:33:
"Answer=(row#)+ (row#)"
will not actually be summing anything.
elimintating typos.

I think Dave meant to have the On Error Resume next
BEFORE setting the Range variable to the
application.Inputbox

eg
Sub TryThis()
Dim MyRange As Range

On Error Resume Next

Set MyRange = Application.InputBox _
(Prompt:="Select any range", Title:="DEMO", Type:=8)
If MyRange Is Nothing Then Exit Sub

MsgBox MyRange.Address


End Sub

Ivan



Posted by Dave Hawley on March 13, 2001 12:52 AM

Hi agian Gina

Try this one. I'm not sure about your print request though, surely you dont want to print just this on a whole sheet of paper ?


Sub TryThis()
Dim MyRange1 As Range, MyRange2 As Range

On Error Resume Next

Set MyRange1 = Application.InputBox _
(Prompt:="Select first cell", Title:="DEMO", Type:=8)
If MyRange1 Is Nothing Then Exit Sub

Set MyRange2 = Application.InputBox _
(Prompt:="Select second cell", Title:="DEMO", Type:=8)
If MyRange2 Is Nothing Then Exit Sub

MsgBox "Answer=(" & MyRange1.Row & ")+ (" & MyRange2.Row & ")"

End Sub

OzGrid Business Applications