Thread: macros
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lois Lois is offline
external usenet poster
 
Posts: 42
Default macros

Hi
the macro runs as it is but i want to add the ability of users to insert
rows & edit cells into the macro. i dont know the 'code' for this or where
to type it in the macro
thanks
--
Lois


"Otto Moehrbach" wrote:

Lois
I take it that nothing happens when you run these macros. Is that
correct? If so, try this: enter the following line of code as the first
line after the Dim statements:
MsgBox "Hello"
Run the macro. Do you see the "Hello" message box? If not, the macro is
not running. What is your macro security setting (Tools - Macro -
Security). If you are running Excel 2007, is the workbook located (on your
hard drive) in a trusted source? HTH Otto
"Lois" wrote in message
...
Hi,
i had the macro assigned to a shortcut code. I have it detailed below
without the permissions to insert rows ect.

Sub ProtectAll()


Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Protect Password:="DESDS"
Next ws



End Sub
Sub UnProtectAll()


Dim wb As Workbook
Dim ws As Worksheet
Dim blnIsProtected As Boolean
Set wb = ActiveWorkbook

For Each ws In wb.Worksheets
ws.Unprotect Password:="DESDS"
Next ws

Set wb = Nothing
Set ws = Nothing


End Sub

--
Lois


"Otto Moehrbach" wrote:

Lois
Exactly what are you doing to run the macro?
Do you want the macro to run automatically? If so, when?
Post the macro you are trying to run. HTH Otto
"Lois" wrote in message
...
Hi,
I am trying to protect a workbook using a macro allowing users the
following
permissions:
insert rows, format cells, use auto filter. Have tried recording a
macro
&
typing the code in but i must be typing it in the wrong place as it
dosent
recognise it! can anyone help?
--
Lois