mikechambers
Active Member
- Joined
- Apr 27, 2006
- Messages
- 397
I realize since I'm using VBA that this is code specific in a way, but I'm more or less trying to understand why Excel behaves differently based on how it's opened.
Method 1: Opening a workbook from File-Open within an existing Excel application instance.
Method 2: Opening the workbook from Windows Explorer, thereby launching an instance of Excel an opening the file.
Opening my workbook using Method 1 works like I want it, but opening it using Method 2 fails on the Workbook Open procedure. In this particular case, Method 2 opens it in Protected View (which I don't understand why, and after clicking Enable, then it fails on "Object variable or With block variable not set" and the line of code is "ActiveWindow.DisplayHeadings = False"
Can anyone help me understand what is going on here? I search extensively on this, but I'm unclear how to even search it.
I should add, Method 2 only fails when the file is located on a SharePoint site location. When I move it to the desktop, or a network drive, Method 2 and Method 1 are the same. I just figured that part out.
Method 1: Opening a workbook from File-Open within an existing Excel application instance.
Method 2: Opening the workbook from Windows Explorer, thereby launching an instance of Excel an opening the file.
Opening my workbook using Method 1 works like I want it, but opening it using Method 2 fails on the Workbook Open procedure. In this particular case, Method 2 opens it in Protected View (which I don't understand why, and after clicking Enable, then it fails on "Object variable or With block variable not set" and the line of code is "ActiveWindow.DisplayHeadings = False"
Can anyone help me understand what is going on here? I search extensively on this, but I'm unclear how to even search it.
I should add, Method 2 only fails when the file is located on a SharePoint site location. When I move it to the desktop, or a network drive, Method 2 and Method 1 are the same. I just figured that part out.
Last edited: