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: 14
Default Input Box error when scrolling

hi all,

rather frustrated as i am unable to determine where i am going wrong on
following code:

Sub insertRow()
Dim rRange As Range
Application.ScreenUpdating = True
output = 666
Prompt = "Select Destination:"
Title = "Insert Row"

'Display the Input Box
On Error Resume Next
Set rRange = Application.InputBox( _
Prompt:=Prompt, _
Title:=Title, _
Default:=ActiveCell.Address, _
Type:=8)
On Error GoTo 0

If rRange Is Nothing Then
MsgBox "Cancelled"
Else
rRange.Range("A1") = output
End If
End Sub

the above code will only execute correctly if the destination cell is
visible on the screen.

however, if the destination cell is not visible on the screen and i
therefore either scroll or enter the destination by key - the
"Cancelled" message box is displayed (instead of entering "666" into the
destination cell) after clicking 'OK'.

in despair i added the 'ScreenUpdating' command hoping this would
rectify the error, but to no avail.

any help is mostly appreciated as to how i would be able to scroll
through a worksheet while the Input Box awaits an entry and after
selecting the destination cell, this address to be stored.

cheers....


...jurgenC

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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
number input error Mick Excel Discussion (Misc queries) 2 August 24th 08 11:15 AM
input box scrolling with barcode reader input cj2k2k Excel Discussion (Misc queries) 0 June 18th 07 07:23 AM
Live Scrolling/Real-Time /Smooth Scrolling doesn't work for me in Excel, even 2007 beta [email protected] Excel Discussion (Misc queries) 2 July 21st 06 01:21 AM
Live Scrolling/Real-Time /Smooth Scrolling doesn't work for me in Excel 2003 [email protected] Excel Discussion (Misc queries) 0 May 12th 06 03:15 AM
Formula input error help JV15 Excel Discussion (Misc queries) 1 May 23rd 05 09:45 AM


All times are GMT +1. The time now is 06:25 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"