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: 3
Default Application.Inputbox acting strangely

Having cleared the problem I queried a while back with
App.Inpbox apparently failing if the box was moved I now
have a further problem that is vexing me somewhat. Code
snips below:

Sub SelectCell(ResOrComp As String)
Dim cRng As Range
Dim ToMany As Boolean
'other irrelevant variables
On Error GoTo mtRange
Do 'Loop to check for multiple range selections
Set cRng = Application.InputBox(prompt:="Select cell to
copy " & ResOrComp & " to", _
Title:="Copy " &
ResOrComp, _
Left:=10, _
Top:=10, _
Type:=8)
On Error GoTo 0
'codeto deal with the result
Loop Until ToMany = False
Me.Show
Exit Sub 'exit if all has worked
mtRange: 'error trap
On Error GoTo 0 'cancel error trapping
MsgBox "No Range selected"
Me.Show
End Sub


This generally works fine, but on some occasions -
normally when I am using a template file that contains
macros but no udf - it throws an error and goes to mtRange
on the Set cRng = line when a range has been selected an
OK clicked.

The error returned is 424 Object required.

Can anyone think what might be causing this. It runs fine
on a blank sheet and often with other sheets open
(including the template) at the same time.

The error comes straight after selecting a range in the
inputbox and clicking OK and does not apparently try to go
elsewhere.

Running xL97 on a Citrix server, but I don't think that
has anything to do with it.

Thanks in advance for any advice you can give. Alan
 
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
Print Entire Workbook acting strangely B. Levien Excel Discussion (Misc queries) 1 December 18th 08 10:17 PM
Comments in a shared Workbook acting strangely J Streger Excel Discussion (Misc queries) 0 June 7th 07 02:28 PM
Comments in a shared Workbook acting strangely J Streger Excel Discussion (Misc queries) 1 June 7th 07 12:14 AM
Conditional formatting acting strangely Potoroo Excel Discussion (Misc queries) 1 August 3rd 06 06:36 AM
application.inputbox Murat Excel Programming 4 February 24th 04 11:38 AM


All times are GMT +1. The time now is 01:54 AM.

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

About Us

"It's about Microsoft Excel"