Barcode Excel File

mayoub

New Member
Joined
Jun 17, 2014
Messages
20
Hi Guys,

Is there any possible way on excel, where i can have multiple sheets filled with information, and where i can have a barcode on each sheet,
The needed is a program where i can just insert the barcode or the reference number in a cell and get directed to the sheet with the similar barcode or reference number,

For example:
Sheet 1 will have the name, date of birth and gender for a Jhon - it is referenced under one code 112
Sheet 2 will have the same details for Marie - it is referenced under the code 113
and so on (probably 300 sheets)

What i need is to enter the reference (it will be a barcode with a barcode reader) and the file will direct me to the sheet with that code,

Thanks,
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Can you use the bar code as the name of the sheet, e.g. 112 for Jhon? Seems to me it'd be quite easy to write a code to display the proper barcode page though I haven't done it.
 
Upvote 0
Can you use the bar code as the name of the sheet, e.g. 112 for Jhon? Seems to me it'd be quite easy to write a code to display the proper barcode page though I haven't done it.

Yes YKY it can be the name of the sheet,
 
Upvote 0
Suppose you have the barcode in the cell A1 of the sheet called Main. Enter the following code in a module:

Code:
Sub Activate_Sheet()

Sheets(Sheets("Main").Range("A1").Value).Activate

End Sub

While still on Sheet Main, click Developer\Insert\Form Controls and select the first item, a button. Then, click somewhere on Main, a window will pop up. Select the sub you just added. This is to associate the code to the button.

Now, enter a barcode, say, 112, in A1 of Main and, then, click the button. Sheet 112 will be activated. This is, of course, assuming that you have already named the sheet 112.
 
Upvote 0
Ok it's working, is there a way to automatically name the sheets without having to enter the barcode on each?

Thanks a lot
 
Upvote 0
Is the barcode value in the same cell in every sheet?
Perhaps....

Code:
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
   ws.Name = ws.Range("A1"). Value
Next ws
 
Upvote 0
Needs the sheet names to be as per the following:
112,113,114,115...

Total of 300 sheets,

Thanks,
 
Upvote 0
Perhaps...
Code:
Dim s As Integer
For s = 1 To ThisWorkbook.Worksheets.Count
  Sheets(s).Name = s + 111
Next s
 
Upvote 0
With the number of sheets you have, you probably need another button on every sheet except Main so you can click it and go back to Main in case you need to select another sheet.
 
Last edited:
Upvote 0
- alternative to get back to first sheet would be to add a shortcut key to macro below
- Macro / Options / ShortCut Key
- would work from any sheet

Code:
Sub GoToFirstSheet()
    Sheets(1).Activate
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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