Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Checking some values in Workbook

I have a userform with some texboxes and comboboxes. If the user types or
select something, that data will be written to cells. (Sheet1A1, Sheet2B15,
Sheet3K29, etc.)
That input must be checked before it can be stored in the database. If the
cells doesn't contain proper data, the commandbutton1 must be disabled. I
would like to know how create a macro that checks all these specific cells.
Should I use select case?

Thanks for helping, Gert-Jan


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Checking some values in Workbook

How will you initiate the checks. Normally it would be clicking a button,
such as the OK button, then just look at each value and test it. If they are
okay, write them away, else throw up an error message.

Select Case might be a strategy, but there is too little info to advise.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Gert-Jan" wrote in message
.. .
I have a userform with some texboxes and comboboxes. If the user types or
select something, that data will be written to cells. (Sheet1A1,

Sheet2B15,
Sheet3K29, etc.)
That input must be checked before it can be stored in the database. If the
cells doesn't contain proper data, the commandbutton1 must be disabled. I
would like to know how create a macro that checks all these specific

cells.
Should I use select case?

Thanks for helping, Gert-Jan




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Checking some values in Workbook

The situation is like this:

- in the userform are textboxes and comboboxes (total: 6)
- if the user types or selects something (on change), the data will be
written to a sheet (that will happen on 6 places)

I want a macro that will run (also on change of one of texboxes /
comboboxes) and check if the filled in / selected data is proper.

A sort function like this

Sub check()
If range (Sheet1!D5).value = 1 OR
If range (Sheet2!D8).value = 0 OR
etc
CommandButton1.enabled = false

I have never worked with caseselect-functions, any help would be nice ;-)

"Bob Phillips" schreef in bericht
...
How will you initiate the checks. Normally it would be clicking a button,
such as the OK button, then just look at each value and test it. If they
are
okay, write them away, else throw up an error message.

Select Case might be a strategy, but there is too little info to advise.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Gert-Jan" wrote in message
.. .
I have a userform with some texboxes and comboboxes. If the user types or
select something, that data will be written to cells. (Sheet1A1,

Sheet2B15,
Sheet3K29, etc.)
That input must be checked before it can be stored in the database. If
the
cells doesn't contain proper data, the commandbutton1 must be disabled. I
would like to know how create a macro that checks all these specific

cells.
Should I use select case?

Thanks for helping, Gert-Jan






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Checking some values in Workbook

And, of course: if the values are Ok, CommandButton1.enabled = True

"Gert-Jan" schreef in bericht
.. .
The situation is like this:

- in the userform are textboxes and comboboxes (total: 6)
- if the user types or selects something (on change), the data will be
written to a sheet (that will happen on 6 places)

I want a macro that will run (also on change of one of texboxes /
comboboxes) and check if the filled in / selected data is proper.

A sort function like this

Sub check()
If range (Sheet1!D5).value = 1 OR
If range (Sheet2!D8).value = 0 OR
etc
CommandButton1.enabled = false

I have never worked with caseselect-functions, any help would be nice ;-)

"Bob Phillips" schreef in bericht
...
How will you initiate the checks. Normally it would be clicking a button,
such as the OK button, then just look at each value and test it. If they
are
okay, write them away, else throw up an error message.

Select Case might be a strategy, but there is too little info to advise.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Gert-Jan" wrote in message
.. .
I have a userform with some texboxes and comboboxes. If the user types
or
select something, that data will be written to cells. (Sheet1A1,

Sheet2B15,
Sheet3K29, etc.)
That input must be checked before it can be stored in the database. If
the
cells doesn't contain proper data, the commandbutton1 must be disabled.
I
would like to know how create a macro that checks all these specific

cells.
Should I use select case?

Thanks for helping, Gert-Jan








Reply
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
RETRIEVE DATA FROM ANOTHER WORKBOOK BY CHECKING ON WORKBOOK DATE Joe Excel Worksheet Functions 13 May 27th 08 01:52 AM
Checking values in 2 columns BRob Excel Worksheet Functions 4 May 1st 08 02:32 PM
Checking a column of values against another one BRob Charts and Charting in Excel 1 May 1st 08 09:18 AM
Checking on two values Johannes B. Excel Discussion (Misc queries) 4 April 22nd 05 06:49 PM
checking values in a cel solo_razor[_8_] Excel Programming 2 September 18th 03 01:37 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"