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: 692
Default Type mismatch using rnge as Range with Type 8 Input Box

Thanks in advance for any and all help.

I have been using the following code to paste formulas from one range to
another.
The range is highlighted and than the code shows an input box for a cell
selection.

Most of the time it works beautifully. Other times it gives a type mismatch
on rnge and fails.

I don't understand why one selection works and another doesn't. With or
without Events enabled.
A1 or R1C1 reference. (I primarily use this in one workbook from
Personal.xls). All selections are similar in size and starting cell - just
different rows.

Using in XL 2k & XL 2003

Dim rnge
Set rnge = Nothing
Application.ScreenUpdating = True
On Error Resume Next
Set rnge = Application.InputBox("Select Cell", Type:=8) <<< errors
here
On Error GoTo 0
Application.ScreenUpdating = False
If rnge Is Nothing Then
Exit Sub
<<< Exits here on error
End If

Selection.Copy
rnge.Cells(1).PasteSpecial Paste:=xlPasteFormulas

Again - Thanks...
--
steveB

Remove "AYN" from email to respond


 
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
error 13 type mismatch input box cluckers Excel Discussion (Misc queries) 1 October 28th 09 07:01 PM
input box date type mismatch Matilda Excel Programming 4 November 26th 05 02:40 PM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
Type mismatch on range name davegb Excel Programming 2 June 8th 05 06:15 PM
Type mismatch in VBA LinEst function if range too large RyanVM[_16_] Excel Programming 4 August 10th 04 02:47 AM


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