Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Thread Tools Display Modes
Old 06-26-2020, 06:48 AM
AntCTAZ AntCTAZ is offline Excel VBA - Detect in Coauthoring Mode Windows 10 Excel VBA - Detect in Coauthoring Mode Office 2019
Excel VBA - Detect in Coauthoring Mode
Join Date: Mar 2020
Posts: 1
AntCTAZ is on a distinguished road
Default Excel VBA - Detect in Coauthoring Mode


My company utilizes Excel Coauthoring using Office 365 and SharePoint. We also utilize an Excel Add-in full of macros I've created for the team. For one macro, I need it to only be able to be used when not in coauthoring mode. There were two ways I thought I could approach this:

(1) Somehow be able to detect if coauthoring is enabled; or
(2) Count the number of users currently in the coauthored Excel file.

I found and tried the VBA function UserStatus, however reading up on that, it seems to only work in a Shared workbook environment, not coauthored environment - with other people from my organization coauthoring an Excel workbook...

Users = ThisWorkbook.UserStatus
For usernum = 1 To UBound(Users, 1)
MsgBox Users(usernum, 1)

only returned one user (me). I also tried this code for ActiveWorkbook instead of ThisWorkbook.

I did a lot of googling on how to tell if you're in coauthoring or count the number of activeusers, but couldn't find anything helpful.

Any help would be appreciated - Thank you!
Reply With Quote
Old 06-29-2020, 01:45 PM
trevorc trevorc is offline Excel VBA - Detect in Coauthoring Mode Windows 7 32bit Excel VBA - Detect in Coauthoring Mode Office 2013
Competent Performer
Join Date: Jan 2017
Posts: 139
trevorc will become famous soon enoughtrevorc will become famous soon enough

Perhaps you can give all users a macro to run on their PC, this sets a global variable when they start Excel that you can check to see who is online or count them. when they exit it should clear their variable.
Reply With Quote

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel for the Web Tool Bar in Viewing Mode RFeds0320 Excel 0 01-13-2020 01:39 PM
Conrol / detect Latex mode for equation editor George Keeling Word VBA 0 11-05-2019 08:26 AM
Why are Portrait mode JPG Images changed to landscape mode KHH0725 PowerPoint 0 02-22-2017 01:51 PM
Microsoft Office Word Online Text Space is Different in Reading Mode from When it's in Editing Mode darkjanggo Word 1 12-15-2015 05:06 PM
Excel VBA - Detect in Coauthoring Mode Word won't come back to normal mode from proofreading mode prg4hire Word 2 09-25-2010 09:46 AM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 08:40 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd. is not affiliated with Microsoft