Over the weekend our company pushed an update and moved us from Office 2016 32-bit to MS Office 365 64-bit. As "Keeper of the Flame" with Excel macros, I got the calls that users are seeing errors when the open certain workbooks. Most were resolved by adding PtrSafe to Library calls. But there's a few that have me scratching my head. Any help is greatly appreciated.
-- I needed to check if a file could touch the server. I was using "If ThisWorkbook.bServerOnline =True Then" -- but this morning that's an error. I can't find any documentation for bServerOnline - almost makes me wonder if it's supposed to be a UDF, which I can't find either. I'm holing someone can provide info on this, or a method to see if the workbook can connect to the server.
-- I have a UDF called SpecialFolderPath2 which I use in several places. The Compiler is throwing the error "Ambiguous name detected: SpecialFolderPath2" on code inside a form, and the function exists inside a module in the same project. All it does is return the path to the user's Templates folder. When I put the code in a Sub, it runs okay. (I added a Dim SpecialFolderPath2 as String.) Any suggestions??
-- Is there any way to make the Compiler ignore a certain error so I can skip to the next one?
Thanks!
Ed
-- I needed to check if a file could touch the server. I was using "If ThisWorkbook.bServerOnline =True Then" -- but this morning that's an error. I can't find any documentation for bServerOnline - almost makes me wonder if it's supposed to be a UDF, which I can't find either. I'm holing someone can provide info on this, or a method to see if the workbook can connect to the server.
-- I have a UDF called SpecialFolderPath2 which I use in several places. The Compiler is throwing the error "Ambiguous name detected: SpecialFolderPath2" on code inside a form, and the function exists inside a module in the same project. All it does is return the path to the user's Templates folder. When I put the code in a Sub, it runs okay. (I added a Dim SpecialFolderPath2 as String.) Any suggestions??
VBA Code:
Public Function SpecialFolderPath2() As String
Dim objWSHShell As Object
Set objWSHShell = CreateObject("WScript.Shell")
SpecialFolderPath2 = objWSHShell.SpecialFolders("Templates")
End Function
-- Is there any way to make the Compiler ignore a certain error so I can skip to the next one?
Thanks!
Ed