array nulls

synergy16

Active Member
Joined
Mar 17, 2016
Messages
422
Office Version
  1. 365
Platform
  1. Windows
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
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Maybe...
Code:
If Arr(0) <> vbnullstring then
'do something
Else
msgbox "No serial for U"
end if
HTH. Dave
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top