-
WSgvanhook
AskWoody LoungerI like this idea of a usage log and I am adapting your code to a workbook of my own. It is shared and I have always been curious to know when the other parties have been in the workbook. The problem I see with your current code is that if the user closes out of the spreadsheet without saving, then the username and date/time opened is not saved. Is there a way to save the log without forcing the Workbook_BeforeSave code to run?
-
WSgvanhook
AskWoody LoungerHans, As soon as you sent the answer I realized that my friend was still using 2003. I should have realized that was the problem but I didn’t check the file extension. Thank you again for all of your help. The new version of this subroutine that you suggest will allow it to work in both versions.
Thanks
-
WSgvanhook
AskWoody LoungerHans, Perfect as usual. I didn’t think of using the Max function when I was drawing this out.
-
WSgvanhook
AskWoody LoungerHans,
Try this one. I pasted the values where there were external links.
thanks! -
WSgvanhook
AskWoody LoungerHans, My apologies. The workbook would not let me save the actual formula because of the error in it. The formula I included in the original post is the one giving the error. Even making the correction you suggested I still receive the error box. When I click OK the entire formula is highlighted in the formula bar.
Maybe a better explanation of what I am attempting to do will help. I am calculating wage increases based on the score in column N. Certain tasks are not eligible for increase and are marked as Exempt in column T. If the task is eligible then the formula in T calculates the amount of increase based on the score in N and the scales which I did not include on the original attachment. I now need to see if the new wage (increase plus base) exceeds the maximum allowable wage for that task which is in column U. If the max wage is equaled or exceeded then column V should list the max wage else it should list the new calculated wage.
Does that help?
-
WSgvanhook
AskWoody LoungerSo regarding Hans post about the parantheses, is this the correct placement?
If (Cells(n,21) = 9900 or Cells(n,21) = 9915) _
And (Cells(n,25) = “CB” or Cells(n,25) = “MB”) Then
Cells(n,1).EntreRow.Delete -
WSgvanhook
AskWoody LoungerHans, Perfect as always! Thank you to both you and Jerry!
-
WSgvanhook
AskWoody LoungerHi Jerry,
I have tried the code and it is not deleting any rows. I have attached a sample of the data and the macro as I typed it in. I do not see why it is not working. There are 10 rows in the sample data that meet the criteria for deletion.
-
WSgvanhook
AskWoody LoungerThank you Hans,
I have attached a different file that shows that the procedures below work correctly some of the time. If anyone else has any idea, please let me know.
-
WSgvanhook
AskWoody LoungerThanks! That’s what I get for straying from the Lounge!!!
-
WSgvanhook
AskWoody LoungerDoes this do what you want?
=IF(E2=”X”,”No”,IF(F2=”X”,”NO”, IF(G2=”X”,”No”,”Yes”))) -
WSgvanhook
AskWoody LoungerSorry for the delayed response but I got pulled to another project for a few days and I’m just now getting back to this one.
Your code does most of what I need, but now I am finding that I need to test to see if protection is enabled before I apply the code. Here is what I am using:
Dim wshtarget as Worksheet
Set wshTarget= Worksheets (“View”)
wshTarget.Activate
If ActiveSheet.Protection= True Then
with Worksheets(“View”)
.Unprotect, Password:=”password”
End With
End IfWhen I run this piece of code, I receive a Run-Time error ‘438’:
Object doesn’t support this property or method.I have looked at the help files and can’t see where I am going wrong. The method I am using came from a Ozgrid Post
http://www.ozgrid.com/forum/showthread/?t=67806%5B/url%5DAny help would be approciated!
-
WSgvanhook
AskWoody LoungerThank you Hans. This worked beautifully!
-
WSgvanhook
AskWoody LoungerHans,
I uploaded the incorrect workbook the first time. There were some steps that needed to be taken first which allowed the constants to be correct. I have modified the workbook to show you what it should be at this point the code is looking at the time and moving the row. This is only one section of a much longer macro that does many other things to the spreadsheet.
Thanks in advance!
-
WSgvanhook
AskWoody LoungerSorry about that. Clicked the wrong button and forgot to attach the file.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
MS Office 365 Home on MAC
by
MickIver
1 hour, 54 minutes ago -
search by picture an not all that’s cracked up to be (Awaiting moderation)
by
Dru Fuksa
6 hours, 51 minutes ago -
Google’s Veo3 video generator. Before you ask: yes, everything is AI here
by
Alex5723
13 hours, 57 minutes ago -
Flash Drive Eject Error for Still In Use
by
J9438
15 hours, 30 minutes ago -
Windows 11 Insider Preview build 27863 released to Canary
by
joep517
1 day, 8 hours ago -
Windows 11 Insider Preview build 26120.4161 (24H2) released to BETA
by
joep517
1 day, 8 hours ago -
AI model turns to blackmail when engineers try to take it offline
by
Cybertooth
12 hours, 29 minutes ago -
Migrate off MS365 to Apple Products
by
dmt_3904
13 hours, 17 minutes ago -
Login screen icon
by
CWBillow
3 hours, 40 minutes ago -
AI coming to everything
by
Susan Bradley
11 hours, 16 minutes ago -
Mozilla : Pocket shuts down July 8, 2025, Fakespot shuts down on July 1, 2025
by
Alex5723
2 days ago -
No Screen TurnOff???
by
CWBillow
2 days ago -
Identify a dynamic range to then be used in another formula
by
BigDaddy07
2 days, 1 hour ago -
InfoStealer Malware Data Breach Exposed 184 Million Logins and Passwords
by
Alex5723
2 days, 13 hours ago -
How well does your browser block trackers?
by
n0ads
1 day, 23 hours ago -
You can’t handle me
by
Susan Bradley
23 hours, 16 minutes ago -
Chrome Can Now Change Your Weak Passwords for You
by
Alex5723
1 day, 15 hours ago -
Microsoft: Over 394,000 Windows PCs infected by Lumma malware, affects Chrome..
by
Alex5723
3 days ago -
Signal vs Microsoft’s Recall ; By Default, Signal Doesn’t Recall
by
Alex5723
2 days, 3 hours ago -
Internet Archive : This is where all of The Internet is stored
by
Alex5723
3 days ago -
iPhone 7 Plus and the iPhone 8 on Vantage list
by
Alex5723
3 days ago -
Lumma malware takedown
by
EyesOnWindows
2 days, 13 hours ago -
“kill switches” found in Chinese made power inverters
by
Alex5723
3 days, 9 hours ago -
Windows 11 – InControl vs pausing Windows updates
by
Kathy Stevens
3 days, 9 hours ago -
Meet Gemini in Chrome
by
Alex5723
3 days, 13 hours ago -
DuckDuckGo’s Duck.ai added GPT-4o mini
by
Alex5723
3 days, 13 hours ago -
Trump signs Take It Down Act
by
Alex5723
3 days, 21 hours ago -
Do you have a maintenance window?
by
Susan Bradley
2 days, 2 hours ago -
Freshly discovered bug in OpenPGP.js undermines whole point of encrypted comms
by
Nibbled To Death By Ducks
2 days, 23 hours ago -
Cox Communications and Charter Communications to merge
by
not so anon
4 days, 1 hour ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.