Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, Can any body tell me if there is a code I can use that will set the
Macro Security to low when the workbook is opened and then return to high when the workbook is shut down. I work on a network where the default is set to high. thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you could use code to set security to low, security settings would be
useless as a tool to prevent malicious code. If security is high, unsigned workbooks won't run code so how would you get the code to run in any case? Gord Dibben MS Excel MVP On Wed, 4 Mar 2009 14:58:06 -0800, will07 wrote: Hi, Can any body tell me if there is a code I can use that will set the Macro Security to low when the workbook is opened and then return to high when the workbook is shut down. I work on a network where the default is set to high. thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
People forget the SQL's are long strings try this
SelectSQL = _ "SELECT DISTINCT v_inputfiles.sName AS 'Client Name'," & _ "ciSE.ciSEqty," & _ "ciSE.ciSEvalue," & _ "ciSE.ciSECharge," & _ "ciSE.ciSEInRefSource," & _ "ciSE.ciSEInRefData" FromSQL = _ "FROM chronosv2.dbo.ciSE ciSE," & _ "chronosv2.dbo.v_inputfiles v_inputfiles" WhereSQL = _ "WHERE ciSE.ciSEclient = v_inputfiles.sID AND " & _ "((ciSE.ciSEbillingmonth='2008-10'))" GroupSQL = _ "GROUP BY v_inputfiles.sName, " & _ "ciSE.ciSEID, " & _ "ciSE.ciSEqty, " & _ "ciSE.ciSEvalue, " & _ "ciSE.ciSECharge, " & _ "ciSE.ciSEInRefSource," & _ "ciSE.ciSEInRefData" HavingSQL = _ "HAVING (ciSE.ciSEInRefSource='TM') AND (ciSE.ciSEInRefData='ELIST')" Sql = SelectSQL & FromSQL & WhereSQL & HavingSQL "will07" wrote: Hi, Can any body tell me if there is a code I can use that will set the Macro Security to low when the workbook is opened and then return to high when the workbook is shut down. I work on a network where the default is set to high. thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
did you try to overdrive your excel file with vb script.
something like this: 'Dim ex As Excel.Application 'Application Excel 'Dim wb As Excel.Workbook 'Classeur Excel 'Dim ws As Excel.Worksheet 'Feuille Excel Set ex = CreateObject("Excel.Application") ex.Visible = True Function GetPath() Dim path path = WScript.ScriptFullName WScript.Echo path GetPath = Left(path, InStrRev(path, "\")) End Function p=getpath() Set feuille = ex.Workbooks.Open(p &"\your_excel_file.xls") set wb=ex.activeworkbook Set ws = wb.ActiveSheet ex.run "macro1",5 wb.save wb.Close 'Fermeture du classeur Excel ex.Quit'Fermeture de l'application Excel Set ws = Nothing Set wb = Nothing Set ex = Nothing "will07" a écrit dans le message de ... Hi, Can any body tell me if there is a code I can use that will set the Macro Security to low when the workbook is opened and then return to high when the workbook is shut down. I work on a network where the default is set to high. thanks -- Michel Angelosanto, Bordeaux Dernières mises Ã* jour du site Voyage au pays Internet http://angelosa.free.fr/index.php?t=8 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Avoid Outlook macro security for Excel bades macro | Excel Programming | |||
Macro needed to set macro security in Excel to minimum | Excel Programming | |||
Macro Security? | Excel Discussion (Misc queries) | |||
Macro Security | Excel Discussion (Misc queries) | |||
Macro Security | Excel Programming |