LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Macro for running on preotected sheets

Thanks for your help Mike H & Wigi. Code works fine.

"Wigi" wrote:

You can protect your sheet with the argument UserInterfaceOnly set to True.


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Yogin" wrote:

Hi All,

I am using the code below but when I protect the sheet it doesn't work, can
someone help on this problem please.

Sub TeamLeadersLates()

Dim MyDate As Date, StringDate As String
With Sheets("Daily Sheet")
StringDate = InputBox("Enter Date")
If IsDate(StringDate) Then
MyDate = DateValue(StringDate)

.Range("E2") = MyDate
Else
MsgBox "Invalid Date"
Exit Sub
End If

.Range("$B$4:$D$1000").AutoFilter Field:=1
.Range("$B$4:$D$1000").AutoFilter Field:=4
.Range("$B$4:$D$1000").AutoFilter Field:=4, Criteria1:="LTL"

Sheets("Daily Sheet").Select
End With
End Sub

 
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
multiple wk sheets - running balance Deb Excel Discussion (Misc queries) 4 May 22nd 08 11:44 PM
Running total between sheets [email protected] Excel Discussion (Misc queries) 3 January 24th 08 02:22 PM
Sheets("Rpt").Copy different results from running in macro than off excel menu?? tmbo Excel Discussion (Misc queries) 7 August 9th 06 01:13 PM
If I have my sheets protected will that prevent me running a macro to hide certain sells? Marc Excel Worksheet Functions 0 May 17th 06 11:36 PM
calc locks up after running a macro that moves sheets to a new fil shibao Excel Discussion (Misc queries) 0 November 7th 05 10:58 PM


All times are GMT +1. The time now is 07:20 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"