Page 1 of 1

how to restrict user input using macros in Excelladdin

Posted: Fri Dec 11, 2015 3:41 am
by ranga
HI Team ,

i want restrict user input negative value into excel template using macros .

Please help your inputs

Re: how to restrict user input using macros in Excelladdin

Posted: Fri Dec 11, 2015 1:39 pm
by jim wood
Moved to the correct forum.

Re: how to restrict user input using macros in Excelladdin

Posted: Tue Dec 15, 2015 4:26 am
by ranga
Thanks for reply

i am new to this portal . please tell me which group we can keep this post

Re: how to restrict user input using macros in Excelladdin

Posted: Tue Dec 15, 2015 7:19 am
by Wim Gielis
This subforum is fine, Jim moved the topic for you.

Re: how to restrict user input using macros in Excelladdin

Posted: Tue Dec 15, 2015 7:53 am
by RJ!
ranga wrote:HI Team ,
i want restrict user input negative value into excel template using macros .
If I'm reading that right, I think you need to have code against an "On Change" procedure in your Excel Template that monitors the cells your looking at...

Though if it was me, I'd just use Data Validation in Excel to restrict a user from inputting anything "Less then 0" in your form

Re: how to restrict user input using macros in Excelladdin

Posted: Wed Dec 16, 2015 2:06 pm
by Wim Gielis
The event in VBA is called Worksheet_Change event.
You will find thousands of code samples on the internet with a search action.
However, as said above, there are better ways to tackle this requirement.

Re: how to restrict user input using macros in Excelladdin

Posted: Wed Dec 16, 2015 2:44 pm
by jduplessis
Another alternative is using sell locking and protecting the sheet. We use this a lot because it also works in TM1 web, unlike VBA alternatives.

Re: how to restrict user input using macros in Excelladdin

Posted: Wed Dec 16, 2015 3:00 pm
by Wim Gielis
jduplessis wrote:Another alternative is using sell locking and protecting the sheet
How does his restrict the input of negative values ?

Re: how to restrict user input using macros in Excelladdin

Posted: Wed Dec 16, 2015 3:07 pm
by jduplessis
Wim Gielis wrote:
jduplessis wrote:Another alternative is using sell locking and protecting the sheet
How does his restrict the input of negative values ?
Ah, I stopped reading at restrict values... technically I suppose not being able to enter any value would include not being able to enter negative values, but not the intended outcome...

Re: how to restrict user input using macros in Excelladdin

Posted: Wed Dec 16, 2015 3:40 pm
by Wim Gielis
jduplessis wrote:
Wim Gielis wrote:
jduplessis wrote:Another alternative is using sell locking and protecting the sheet
How does his restrict the input of negative values ?
Ah, I stopped reading at restrict values... technically I suppose not being able to enter any value would include not being able to enter negative values, but not the intended outcome...
Let's give READ access to everyone and we will never ever suffer from bad input :-D

Re: how to restrict user input using macros in Excelladdin

Posted: Wed Dec 23, 2015 2:05 pm
by ranga
Thanks all for your reply