LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Object Error: what am i doing wrong??

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Time 1004 Error: Application or Object Difine Error BEEJAY Excel Programming 0 October 17th 06 10:45 PM
Object Variable Not Set Error on Selection object Jean Excel Worksheet Functions 3 July 24th 06 06:45 PM
Error 1004, Application-definded or object-defined error Mirco Wilhelm[_2_] Excel Programming 9 January 7th 06 04:56 PM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"