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: 5
Default ByRef Argument Type mismatch

I have some code that looks like:

Sub doToCells()
Dim formula As String
...
formula = InputBox(message, title, defString)
pr_doToCells formula
end sub

Private Sub pr_doToCells(formula As String)
If formula < "" Then
formula = Replace(formula, ..., ...)
...
End If
End Sub

But I get an error - ByRef Argument type mismatch when it compiles -
complaining about the "formula" used as an argument to pr_doToCells.
Cannot understand why, and the problem disappears if I put parentheses
around the "formula" argument when I call it.

Any ideas?

Thanks
Tone
 
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
ByRef argument type mismatch when passing dictionary object signon77 Excel Programming 7 January 8th 08 10:03 PM
type mismatch error when passing collection byRef Tara H Excel Programming 2 September 14th 07 05:56 PM
HELP "ByRef Argument Type Mismatch" RocketMan[_2_] Excel Programming 6 June 7th 07 07:00 PM
"ByRef argument type mismatch" Error Baapi[_4_] Excel Programming 2 September 17th 05 12:47 AM
ByRef argument type mismatch error? sermest Excel Programming 4 June 17th 05 06:50 PM


All times are GMT +1. The time now is 07:50 PM.

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"