Notification that a user is already on the requested work sheet. - Microsoft Community


in earlier post. hans v assisted me in notifying user when on active sheet 2 different work sheets. tried modifying code single worksheet & not provide user notification. go requested worksheet. there missing?

here current code:

sub monthly_referrals()
dim msg string, ans variant
    
    msg = "would go monthly referral chart?"
    
    ans = msgbox(msg, vbyesno)
    
    select case ans
        
    case vbyes
      if activesheet.name = sheets(67).name then
                msgbox "you on monthly referral chart!", vbinformation
            else
                sheets("monthly referals").activate
                range("a1").select
                end if
                end select
end sub

here code solution:

sub monthly_referrals()
dim msg string, ans variant
    
    msg = "would go monthly referral chart?"
    
    ans = msgbox(msg, vbyesno)
    
    select case ans
        
    case vbyes
      if activesheet.codename = "sheet67" then
                msgbox "you on monthly referral chart!", vbinformation
            else
                sheets("monthly referals").activate
                range("a1").select
                end if
                end select
end sub



Office / Excel / Other/unknown / Office 2010



Comments

Popular posts from this blog

Getting ErrorCode: 120018 when trying to access Microsoft account - Microsoft Community

The message was sent to a distribution list ‎(DL)‎ - Microsoft Community

Activation Error 0x8004FE93 - Microsoft Community