Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Code Navigating to Next Available Worksheet in Range

Status
Not open for further replies.

Randy11

Technical User
Oct 4, 2002
175
CA
Am looking for assistance with some VBA code.

Have a range name set up that is Cell B2 on Sheet1:Sheet10. Range is Named "UnitNumber"

Have placed button control on a menu worksheet that would like to open a InputBox("Key in Unit Number")

If unit number has already been keyed in B2 in range Sheet1:Sheet10 Cell B2, jump to that sheet and land in cell B5.

If unit number has not yet been entered into range Sheet1:Sheet10 Cell B2, then go to next sheet in range with nothing in Cell B2 and place unit number keyed in UnputBox in Cell B2, then move to cell B5.

Currently have code for navigating that is based on Worksheet name and this will not work for what I am trying to achieve.

Your assistance Appreciated....
 
Have verified no leading or following 0's in any of the B2 cells. B2 cells are all formated as General. Ideas?
 



The code works. Your internal data is not comsistent.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
The link cells have the following formulas in them.

So the link to location in column B

=HYPERLINK("#"&"Sheet2!$b$5",Sheet2!$B$2)
 


Does the HL work manually?

What is the TEXT value?

You have to help yourself out and figure out what you code is ACTUALLY doing. No one else can do that for you.

STEP thru your code and report back as required.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top