problem with InputBox

O

Orville

I'm trying to use InputBox, and I keep getting this error message: "compile
error: wrong number of arguments or invalid property assignment". I've
written it as simply as "Dim testValue As String", and then "testValue =
InputBox("Enter a value.")" I've even copied and pasted InputBox examples,
and I get the same message. What am I doing wrong? Thanks.
 
P

Peter Jamieson

Sounds unlikely, but do you have any open documents or templates which have
defined their own InputBox function, e.g. with no parameters?

Peter Jamieson
 
O

Orville

Thanks for the response. I'm pretty sure I don't have any documents or
templates with an InputBox function defined, unless I somehow did that by
accident. Do you know how I could find that out?
 
P

Peter Jamieson

Do you know how I could find that out?

it would only be in a template or document that was loaded, so unless you
have large numbers of macros it should be reasonably easy to look through.

Peter Jamieson
 
O

Orville

From your last post, I got that I just needed to look for any macros that
might have the InputBox function in them. Lo and behold, I found some
unsuccessful (and clueless) attempts to use that function from a year or so
ago. I deleted them, and it works just fine now. Thank you so much. I have a
macro that I need to run repeatedly, manually changing a particular variable
each time. This makes it a lot quicker and easier. Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top