ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Null Values (https://www.excelbanter.com/excel-programming/373613-null-values.html)

[email protected]

Null Values
 
Hi,

I have written a series of macros which insert rows in a database.
Each macro inserts one line with data from the spreadsheet.

I want to avoid sending null rows to the database, but I need to allow
for up to 20 rows to be transferred to the database at a time, when
there may be any number between 1 and 20 to be updated weekly.

Does anyone know of a way to do this? This is the first time I have
used VBA, I have some knowledge of java. Is there an 'if' statement
that can be used in VBA?

Thanks for any help.

:)


Blondie[_2_]

Null Values
 

wrote:
Hi,

I have written a series of macros which insert rows in a database.
Each macro inserts one line with data from the spreadsheet.

I want to avoid sending null rows to the database, but I need to allow
for up to 20 rows to be transferred to the database at a time, when
there may be any number between 1 and 20 to be updated weekly.

Does anyone know of a way to do this? This is the first time I have
used VBA, I have some knowledge of java. Is there an 'if' statement
that can be used in VBA?

Thanks for any help.

:)



Yes there is an IF statement
IF x
THEN y
ELSE z
END IF

also there are
DO x
WHILE y
LOOP,

or
SELECT CASE x
CASE IS y
CASE IS z...
END SELECT.

see
http://visualbasic.about.com/od/lear...cvbsbs0704.htm for
a better description, select case is the nicest looking one if there
are several choices.



All times are GMT +1. The time now is 12:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com