[VBA] 2 questions for VBA Excel

boris2004

New Member
Joined
Mar 1, 2004
Messages
25
Hey

my first question is, is their a way to link a cell to a combobox in a form, like a normal combobox on a excel sheet?

my second question is, i need to check about 5 different cell ranges in 5 different rows and if their is some information in that cell range i need to be able to check the next row down and if that range is empty then add information in not check next row and so on...

Cheers,
Bori
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

al_b_cnu

Well-known Member
Joined
Jul 18, 2003
Messages
4,518
Hi, Welcome to the board.

In answer to your questions,

1) try the ControlSource property of your Combobox.

2) This code:

Dim R as Range

. . .

For Each R in Range("A1:A5")
if R.offset(1,0).value="" then ... 'the adjacent row is empty
If R.Offset(0,1).value= "" then ..... 'the adjacent column is empty
next R


HTH

Alan
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,151,897
Messages
5,767,001
Members
425,393
Latest member
SushiJuice

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
Top