LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default VBA code won't run, even with Macro Security set to Enable All Macors

On Jul 25, 10:56*am, "Vacuum Sealed" wrote:
Hi Brian

In the VBE Window in the left hand pane, you will see ThisWorkbook.

On the Toolbar/Ribbon, goto Insert|Module.

Module1 will appear just under ThisWorkbook, doubleclick it and the right
pane will open up allowing you to enter Functions and Sub Routines.

Using something like the following should help open your workbook, modify to
suit.

Sub Export_PODs()

* * Dim myWB As Workbook

* * With Application
* * * * .ScreenUpdating = False
* * End With

* * On Error Resume Next
* * Set myWB = Workbooks("myWB.xls")
* * On Error GoTo 0
* * If myWB Is Nothing Then
* * Set myWB = Workbooks.Open("C:\YourFolder\myWB.xls")
* * End If

* * Windows("myWB.xls").Activate

* * With Application
* * * * .ScreenUpdating = True
* * End With

Garry will more than likely jump in, hopefully adding some very helpful code
to disable the Macro Security.

HTH
Mick


Thanks for all the help.
I tried Garry's Auto_Open code... and that's seems to work well.
I'll try the Mick's code, if needed.
Thanks,
Brian.


 
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
How to enable "enable automatic update" security setting by VB cod arun Excel Programming 0 May 18th 10 10:36 AM
how to get around the Enable Macro security message? cfman Excel Discussion (Misc queries) 5 March 4th 07 03:59 PM
how to get around the Enable Macro security message? cfman Excel Programming 5 March 4th 07 03:59 PM
Security and Macro Enable help jimbo_jones[_12_] Excel Programming 5 September 29th 05 09:27 PM
Macro Start Autorun without Enable security Jack Excel Programming 9 February 2nd 05 02:59 PM


All times are GMT +1. The time now is 06:51 PM.

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"