[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Excel VB

Posted on 2016-11-07
2
Medium Priority
?
51 Views
Last Modified: 2016-11-07
Hi I want to change this code to add in another user so Richard Atkinson + Bob Smith not sure on how I do that is it an or ?



Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
 If Application.UserName = "Richard Atkinson" Then
    If WorksheetFunction.CountA(Sheets("Order Form").Range("K6,K7")) < 2 Then
        Msg = MsgBox("K6 and K7 need to be populated to continue - Thanks" _
                & vbCrLf & "Do you really want to save?", vbYesNo)
        If Msg = vbYes Then
            Cancel = False
        Else
            Cancel = True
        End If
    End If
0
Comment
Question by:RichardAtk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 33

Accepted Solution

by:
Rob Henson earned 2000 total points
ID: 41877460
If Application.UserName = "Richard Atkinson" Or Application.UserName = "Bob Smith" Then
0
 

Author Closing Comment

by:RichardAtk
ID: 41877462
Perfect thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question