Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using Microsoft Access to create a worksheet and I'm having problems
with the code below. I have originally posted this to the Microsoft Access discussion group and I haven't been able to get the results I need. The first time I run this, it works correct. The second time I run it, I get a run time error 1004 Method 'Range" of object '_Global' failed. If I run it a third time, it works, a fourth time it fails, etc. I have run it first with the title 'Time' and it works. Then I've changed the title before running it the second time. But it still fails the second time. Each time I use the same exact record to test with so it can not be my data. Can you help me? Thank you XLSheet.Unprotect Dim aer As Object For Each aer In XLSheet.Protection.AllowEditRanges If aer.Title = "Time" Then aer.Delete Exit For End If Next XLSheet.Protection.AllowEditRanges.Add Title:="Time", Range:=Range("$H$" & Irow & ":$I$" & Mrow - 1) XLSheet.Protect Password:="cpw1959", DrawingObjects:=True, Contents:=True, Scenarios:=True -- Arkansas Lady |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Range.Group() method fails after 7 calls | Excel Programming | |||
Find method fails in hidden range | Excel Programming | |||
select method of range class fails | Excel Programming | |||
Select method of Range fails | Excel Programming | |||
Copy method fails in IIS | Excel Programming |