LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default How to create a bug report?

Barb-

Thank you for your reply. I tried your suggestion, but it did not disable
the macros in the xlsm workbooks that were being opened.

My real code cycles through multiple files to retrieve data. Prior to this
thread, I did add a debug.print line in between every actual code line in my
real file. Each debug line was triggered (including after every security
line) until it got to the first xlsm file that actually had macros; then each
debug line was still triggered up to the .open line, which successfully opens
the xlsm file (as does the demonstration code in the original post for this
thread). The problem is that it never returns control to the source macro in
the 2003 workbook, so there is no execution of any code after the .open line.

Thank you,
Keith

"Barb Reinhardt" wrote:

If you step through your code, I bet it stops at this line

Application.AutomationSecurity = msoAutomationSecurityForceDisable

Change it to this
Application.AutomationSecurity = msoAutomationSecurityLow

HTH,
Barb Reinhardt

"ker_01" wrote:

I have a replicable problem trying to open XL2007 xlsm files from XL2003,
with the requirement that the macros in the 2007 file must be disabled (the
workbooks are being opened to pull data, but each workbook's "_open" includes
code that resets the target data based on the userID of the person opening
the file).

I have recreated a test case with 12 lines of code (3 in one workbook, 9 in
another-see below. I did some searching, but couldn't find any obvious way to
submit this to MS. Does anyone have a link or information on how to submit
bugs?

To replicate the problem:
-----------------------------
Create a blank 2007 workbook. In the workbook_open event, add msgbox "hello
world" (3 lines of code total). Save the file as XL2007 macro enabled file
type (XLSM).

Open a blank 2003 workbook. Add the following code:

Sub test2007macrowkbk()
Dim secAutomation As MsoAutomationSecurity
secAutomation = Application.AutomationSecurity
Application.AutomationSecurity = msoAutomationSecurityForceDisable
Application.Workbooks.Open Filename:="K:\test2007macro.xlsm",
UpdateLinks:=False, ReadOnly:=True
Msgbox "Process Complete"
Application.AutomationSecurity = secAutomation
End Sub

(replace the filename with the filename of the XL2007 file you saved)

Run the 2003 code. It never makes it to the "process complete" message, the
code just dies after opening the 2007 workbook. If you remove the security
lines of code, it will open the 2007 workbook and trigger the "hello world"
message. If you save the 2003 workbook, open it in 2007 and run the code from
2007, it opens the original 2007 workbook as expected (with macros disabled),
then shows the "process complete" message.

If there is an alternative way to open a 2007 XLSM file from 2003 with
macros disabled, please let me know. If there isn't another way, then I'm
still thinking this would be appropriate for a bug report, and I welcome any
information on how to submit one.

Thank you!
Keith

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a report page??? Mekinnik Excel Programming 2 January 29th 08 08:57 PM
Create Report Robert[_32_] Excel Programming 3 February 9th 07 02:21 PM
how do i create a report from a matrix dunskii Excel Discussion (Misc queries) 0 September 19th 06 05:23 AM
create report in worksheet AskExcel Excel Worksheet Functions 1 July 8th 06 11:23 AM
Create a report from different files Tom Velnosky Excel Discussion (Misc queries) 5 July 27th 05 05:24 PM


All times are GMT +1. The time now is 06:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"