PDA

View Full Version : InputBox



jam03
09-25-2008, 09:21 AM
Hi guys,

I've been using quite a lot of "Application.InputBox" to set ranges in order to make my macros as flexible as possible, since i'm using them for different files. And i like being able to select the ranges with the mouse since a lot of the people who are using my macros don't know much about excel.

I do encounter a little problem though! :banghead: When using different workbooks at the same time, you can't actually switch workbook and select with the mouse ranges in this other workbook... :reading:

So I wanted to know if there was a way to make this possible, to call the same kind of value box as the ones in the "Conditional Formatting facility" where you can select values ranges in other workbooks easily.

Thanks in advance,
Best Regards,

Mateo

Bob Phillips
09-25-2008, 09:54 AM
What makes you think that you can't switch workbooks? I certainly can using Application.Inputbox.

GTO
09-25-2008, 05:16 PM
I don't know if this would help, but I had something similar, where I wanted to be able to select multiple cells on a different sheet or in a different workbook. I recall (well hopefully correctly) that RefEdit wouldn't go to a different workbook.

Anyways, try this workaround.

Hope it helps,

Mark

jam03
09-26-2008, 01:51 AM
Well it's working Great! Thank you very much GTO for such quick and clear reply...

I don't know though why Application.InputBox didn't work out. It would just forbid me to go to the other worksheet...

Best regards, cheers,

Mateo

Bob Phillips
09-26-2008, 02:18 AM
.

Bob Phillips
09-26-2008, 02:20 AM
It doesn't show it very well, but that image shows an inputbox with a range that points at another workbook, the one behind it.

jam03
09-26-2008, 02:31 AM
Ho i see, when the windows aren't maximized, it works just fine, cuz you can't actually change windows when the macro is running.

Thanks xld.

Regards

Bob Phillips
09-26-2008, 02:57 AM
Aah! Another good reason as to why I don't maximize windows.