array nulls

synergy16

Active Member
Joined
Mar 17, 2016
Messages
405
Good afternoon everyone. i currently have a VBA program that looks to if a vendor is present on a spreadsheet, then goes and sees if that vendor has done any work to parts. the user than can click on a part number and all related serial numbers will display in another listbox. the array that is used for the serial number listbox is created before hand and redimmed based on how many part numbers were on the sheet in relation to the selected vendor, (one serial number to each part).

heres the problem im having. there is a possiblity all of the part numbers worked on at a certain vendor might not have serial numbers.

for example.

clicking on vendor A will populate 5 part numbers. so the serial number array gets dimmed with 5 elements in memory, but obviously the serial number listbox is empty. i would like to display a msgbox that the serial number cells arent populated with data by checking to see if the array is empty. the IsEmpty function does not seem to be working for me
 

Some videos you may like

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

NdNoviceHlp

Well-known Member
Joined
Nov 9, 2002
Messages
2,496
Maybe...
Code:
If Arr(0) <> vbnullstring then
'do something
Else
msgbox "No serial for U"
end if
HTH. Dave
 

Watch MrExcel Video

Forum statistics

Threads
1,109,041
Messages
5,526,416
Members
409,701
Latest member
nitmani

This Week's Hot Topics

Top