Run Time Error

clmack70

New Member
Joined
Sep 23, 2008
Messages
32
I have two problems I need help with.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
The code below I get a Run Time Error 1004 about the cell being protected. It highlights “Worksheets("RBS IDS").Range("D" & i + 2).Copy LastR”. I have tried using “UserInterFaceOnly” and “Sheets.unprotect password: =””” either of them work.
Rich (BB code):
Rich (BB code):
Dim i As Long, j As Long, LastR As Range
 
   For i = 0 To Me.ListBox1.ListCount - 1
       If Me.ListBox1.Selected(i) Then
           Set LastR = ActiveSheet.Range("A4")
           If Not IsEmpty(LastR) Then
               Set LastR = ActiveSheet.Range("a" & Rows.Count).End(xlUp)(2)
           End If
           j = j + 1
           Worksheets("RBS IDS").Range("D" & i + 2).Copy LastR<o:p></o:p>
       End If
   Next i
   MsgBox j & " Selection Added"


Also the following code is giving me a Run Time Error 438
<o:p></o:p>
“Object doesn’t support this property or method”
<o:p></o:p>
It highlights “With Application.FindFormat.Font”

Rich (BB code):
Rich (BB code):
Sheets("Sheet1").Range("B4:M654").Select<o:p></o:p>
   With Application.FindFormat.Font<o:p></o:p>
   .Strikethrough = True<o:p></o:p>
   .Superscript = False<o:p></o:p>
   .Subscript = False<o:p></o:p>
   End With<o:p></o:p>
   <o:p></o:p>
   Cells.Find(What:="", After:=ActiveCell, LookIn:=xlContents, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False).Activate<o:p></o:p>
   Rows("4:654").Select<o:p></o:p>
   Selection.Clear<o:p></o:p>
   Range("A4").Select<o:p></o:p>
   Cells.FindNext(After:=ActiveCell).Activate


I am trying to clear the content for rows with strikethrough font.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
For your first question have you tried?

ActiveSheet.Unprotect

For your second question what version of Excel do you have? The FindFormat property is relatively new.
 
Upvote 0
that is what i an trying to figure out. I used the Tool>Protection to lock some cell and allow edit to other cells. Would that cause a problem?
 
Upvote 0

Forum statistics

Threads
1,224,832
Messages
6,181,234
Members
453,026
Latest member
cknader

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top