Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2024, 07:37 PM
Marcia's Avatar
Marcia Marcia is offline Run Time error 1004 Windows 11 Run Time error 1004 Office 2021
Expert
Run Time error 1004
 
Join Date: May 2018
Location: Philippines
Posts: 551
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default Run Time error 1004


Hi. I have a workbook with a macro that fills the active cells. When I locked all the formulae to prevent them from inadvertent edits, the "Run time error 1004" appears everytime I go to unlocked cells.
My knowledge of vba and macro is to google, copy, paste, and record so I am at a loss on how to remove the error.
Thank you for the usual quick help.
Attached Files
File Type: xlsm SK Finance Report Training workshop Templates.xlsm (150.6 KB, 4 views)
Reply With Quote
  #2  
Old 06-13-2024, 04:42 AM
p45cal's Avatar
p45cal p45cal is offline Run Time error 1004 Windows 10 Run Time error 1004 Office 2021
Expert
 
Join Date: Apr 2014
Posts: 947
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Me.Protect UserInterfaceOnly:=True, AllowFormattingCells:=True
Cells.FormatConditions.Delete
Target.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
Target.FormatConditions(1).Interior.ColorIndex = 40
End Sub
Reply With Quote
  #3  
Old 06-13-2024, 07:28 AM
Marcia's Avatar
Marcia Marcia is offline Run Time error 1004 Windows 11 Run Time error 1004 Office 2021
Expert
Run Time error 1004
 
Join Date: May 2018
Location: Philippines
Posts: 551
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Perfect. Again, big big thanks p45Cal. Had you not come to the rescue, my last resort would be to delete the highlight code.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Suddenly having trouble using .Refresh BackgroundQuery. Error 1004, General ODBC Error PLSBRYDOBOY Excel Programming 0 08-30-2019 12:17 PM
Run Time error 1004 Error 1004 on EnvelopeVisable mamies Excel Programming 4 03-01-2017 05:14 PM
Run Time Error '1004' galkej Excel 0 02-03-2014 06:39 AM
Run Time error 1004 Run-time error '1004': Document not saved. The document may be open... doctor_who12 Excel Programming 1 01-22-2014 04:47 PM
Run Time error 1004 Run time error 1004 yonasan Excel Programming 3 06-12-2012 11:08 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:38 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft