View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Macro fails on 1 out of 4 computers

If the user hits cancel, then you'll get an error--unless you're checking for
that:

set mycell = nothing
on error resume next
Set myCell = Application.InputBox(Prompt:="Please select a Vendor by" _
& vblf & vblf & "clicking on their NAME cell", Type:=8).Cells(1)
on error goto 0

if mycell is nothing then
msgbox "user hit cancel"
else
msgbox "user selected: " & mycell.address(external:=true)
end if

=========
But I bet that's not the problem.

What fails?


CLR wrote:

Hi All.........
I have a little Excel program that works fine on three different computers,
and mostly works on a fourth, but one of the macros fails on this line on
the fourth computer...

Set myCell = Application.InputBox(Prompt:="Please select a Vendor by" &
Chr(10) & Chr(13) & Chr(13) & " clicking on their NAME cell",
Type:=8).Cells(1)

All three are Windows XP and Excel 2k

Anybody know why, please?

TIA
Vaya con Dios,
Chuck, CABGx3


--

Dave Peterson