How to change code to and

tambadal

New Member
Joined
Oct 31, 2019
Messages
10
Code:
Private Sub Command43_Click()
'Admin Button  Bring back nav and other views that are hidden
       
       
If Text9.Value = "tam.badal" Then

'UnHide the hidden objects in the navigation pane
    Application.SetOption "Show Hidden Objects", True
'UnLock navigation pane
    DoCmd.LockNavigationPane False
'Enable right clicks and menus
    CurrentDb.Properties("AllowFullMenus") = True
    CurrentDb.Properties("AllowShortcutMenus") = True
    CurrentDb.Properties("AllowBuiltinToolbars") = True
    DoCmd.ShowToolbar "Ribbon", acToolbarYes
    DoCmd.SelectObject acTable, , True
    
Else
End If
     
End Sub

How do I modify this and statement to say If Text9.Value = "tam.badal" or "Gregory.heyman" Then...
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi & welcome to MrExcel.
Assuming it's the same way as excel try
Code:
If Text9.Value = "tam.badal" Or Text9.Value = "Gregory.heyman" Then
 
Upvote 0
Have you tried:

If Text9.Value = "tam.badal" Or Text9.Value = "Gregory.heyman" Then
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,291
Members
448,564
Latest member
ED38

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