Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Experts, in my quest to explore macro's I am currently lost. I
learn mostly by creative copy pasting and a lot of trail and error... ;-) However, i am... stuck. Is there anyone who can review my code and tell me why I get an error telling me the 'Object does not support the property or method'. The lines generating this error have been put between (I copied this from a sheet where i use this also and it does work!) Sub Write_Results() Dim sDateExtract As String Dim FoundCell As Range Dim lFiledate As Long Dim rLastSplitsPerAI As Range Dim LSPAI As Long Dim sFileNameResults As String 0 If lFiledate = 0 Then lFiledate = InputBox("Enter date of reportation. (yyyymmdd)") MsgBox "You will create the SE Report for " & lFiledate Else End If sFileNameResults = "SE statistiek " & lFiledate & ".xls" LSPAI = 126 Set rLastSplitsPerAI = Range(Cells(3, 1), Cells(3, LSPAI)) sDateExtract = Mid(lFiledate, 5, 2) & "/" & Right(lFiledate, 2) & "/" & Left(lFiledate, 4) MsgBox sDateExtract Windows("overview_f.xls").Activate Sheets("SPAI").Select Set FoundCell = Range("A1:A800").Find _ (What:=DateValue(sDateExtract), LookIn:=xlFormulas) If FoundCell < "" Then Workbooks("overview_f.xls").Sheets("SPAI").Range(C ells(FoundCell.Row, 2), Cells(FoundCell.Row, 127)).Value _ = Workbooks(sFileNameResults).Sheets("SPAI").rLastSp litsPerAI.Value Else MsgBox "Oops... something went wrong, check things manually plz." End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run Time 1004 Error: Application or Object Difine Error | Excel Programming | |||
Object Variable Not Set Error on Selection object | Excel Worksheet Functions | |||
Error 1004, Application-definded or object-defined error | Excel Programming | |||
run-time error '1004': Application-defined or object-deifined error | Excel Programming | |||
Syntax Error Runtime Error '424' Object Required | Excel Programming |