VBA IF cell in a specific sheet is equal to a number, the go to a specific sheet

nickthebizz

New Member
Joined
Jan 24, 2021
Messages
22
Office Version
  1. 2016
Platform
  1. Windows
Hi, my skills in VBA is at beginning level.

I have a sheet where I have my clients names written. I have made a button and I would like this button to take me to a specific sheet when each client is selected. I have manage to make a list where when i choose a client it returns a number in a cell starting from 1 and on in my clients sheet.

So if this number is equal to 1 I need the button to take me to a specific sheet which is for that specific client. If the cell is equal to 2 to another sheet etc.

Could anyone give me an insight please

thank you

Nik
 
So it looks like you have the solution
But I thought in post 3 you said button was in sheet named "Main:
Your quote in post 3
Name of Sheet with Button is "Main"

Or all you putting buttons in more then one sheet?

If so write code like this: ans=Activesheet.name
If your interested:
We can use a script where you enter "2" into Range("A1") and the script runs automatically
No need for a button in each sheet.
Let me know if your interested.
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,215,061
Messages
6,122,921
Members
449,094
Latest member
teemeren

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