Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Error - Need assistance Please - Object doesn't support thisproperty...

The following error : run-time error 438 occures when I click a button
called Add to ledger:

Sub ADDtoLedger_Click()
Dim sh As Worksheet, lastrow As Long
Set sh = Worksheets("Data")
With Worksheets("Log")
lastrow = Cells(Rows.Count, 1).End(xlUp).Row + 1
If lastrow = True Then lastrow = Cells(Rows.Count,
1).End(xlDown).Row + 1
.Cells(.Row).Value = sh.Range("C3").Value & ", " & _
sh.Range("C5").Value & " " & sh.Range("C7").Value
.Cells(lastrow, 2).Value = sh.Range("W3").Value
End With

End Sub

Can someone help me out with this code - the error says Object doesn't
support this property or method. In the VB editor it yellows the
rows .Cells(.Row).Value and sh.Range("C5...

I am trying to track all the data I enter on one sheet (called Data)
to a ledger that has all entries from previous occasions (called
Log).

Thanks, Bull
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Error - Need assistance Please - Object doesn't support this property...

What are you trying to say with:
..Cells(.Row).Value ?

"Bull" wrote in message
...
The following error : run-time error 438 occures when I click a button
called Add to ledger:

Sub ADDtoLedger_Click()
Dim sh As Worksheet, lastrow As Long
Set sh = Worksheets("Data")
With Worksheets("Log")
lastrow = Cells(Rows.Count, 1).End(xlUp).Row + 1
If lastrow = True Then lastrow = Cells(Rows.Count,
1).End(xlDown).Row + 1
.Cells(.Row).Value = sh.Range("C3").Value & ", " & _
sh.Range("C5").Value & " " & sh.Range("C7").Value
.Cells(lastrow, 2).Value = sh.Range("W3").Value
End With

End Sub

Can someone help me out with this code - the error says Object doesn't
support this property or method. In the VB editor it yellows the
rows .Cells(.Row).Value and sh.Range("C5...

I am trying to track all the data I enter on one sheet (called Data)
to a ledger that has all entries from previous occasions (called
Log).

Thanks, Bull



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default Error - Need assistance Please - Object doesn't support thisproperty...

You have:

With Worksheets("Log")

and then

.Cells(.Row).Value

The Worksheet object doesn't have a .Row property.

You apparently want a value for the row, yes? How are you capturing
that value?

Also, I think Cells want (row, column), which would be two numbers.
Like you have in:
.Cells(lastrow, 2).Value = sh.Range("W3").Value


Ed


On Jun 10, 11:46*am, Bull wrote:
The following error : run-time error 438 occures when I click a button
called Add to ledger:

Sub ADDtoLedger_Click()
Dim sh As Worksheet, lastrow As Long
Set sh = Worksheets("Data")
With Worksheets("Log")
* lastrow = Cells(Rows.Count, 1).End(xlUp).Row + 1
* If lastrow = True Then lastrow = Cells(Rows.Count,
1).End(xlDown).Row + 1
* .Cells(.Row).Value = sh.Range("C3").Value & ", " & _
* * *sh.Range("C5").Value & " " & sh.Range("C7").Value
* .Cells(lastrow, 2).Value = sh.Range("W3").Value
End With

End Sub

Can someone help me out with this code - the error says Object doesn't
support this property or method. *In the VB editor it yellows the
rows .Cells(.Row).Value and sh.Range("C5...

I am trying to track all the data I enter on one sheet (called Data)
to a ledger that has all entries from previous occasions (called
Log).

Thanks, Bull


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Error - Need assistance Please - Object doesn't support thisproperty...

On Jun 10, 1:12*pm, Ed from AZ wrote:
You have:

With Worksheets("Log")

and then

.Cells(.Row).Value

The Worksheet object doesn't have a .Row property.

You apparently want a value for the row, yes? *How are you capturing
that value?

Also, I think Cells want (row, column), which would be two numbers.
Like you have in:
* .Cells(lastrow, 2).Value = sh.Range("W3").Value

Ed

On Jun 10, 11:46*am, Bull wrote:



The following error : run-time error 438 occures when I click a button
called Add to ledger:


Sub ADDtoLedger_Click()
Dim sh As Worksheet, lastrow As Long
Set sh = Worksheets("Data")
With Worksheets("Log")
* lastrow = Cells(Rows.Count, 1).End(xlUp).Row + 1
* If lastrow = True Then lastrow = Cells(Rows.Count,
1).End(xlDown).Row + 1
* .Cells(.Row).Value = sh.Range("C3").Value & ", " & _
* * *sh.Range("C5").Value & " " & sh.Range("C7").Value
* .Cells(lastrow, 2).Value = sh.Range("W3").Value
End With


End Sub


Can someone help me out with this code - the error says Object doesn't
support this property or method. *In the VB editor it yellows the
rows .Cells(.Row).Value and sh.Range("C5...


I am trying to track all the data I enter on one sheet (called Data)
to a ledger that has all entries from previous occasions (called
Log).


Thanks, Bull- Hide quoted text -


- Show quoted text -


The value for .Row is taken from Data Sheeet.

Cells that contain Last, First, and Middle names are C3, C5 and C7.

The Last, First, MName is transferred to the sheet Log on the next
available row down.
So I need to define further.

Not sure what I need to do to fix. Thanks for the replies.
Bull
Reply
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
runtime error 434, object does not support this method or property Janis Excel Discussion (Misc queries) 4 January 17th 08 04:10 PM
Object doesn't support this property or method (Error 438) gazza67[_2_] Excel Programming 2 August 9th 07 02:30 AM
help with my code please. (Error: Object doesn't support this property or method) funkymonkUK[_137_] Excel Programming 5 April 6th 06 03:44 PM
Object doesn't support this property or method (Error 438) Kiran Excel Discussion (Misc queries) 1 July 12th 05 08:42 PM
Run Time Error 438 - Object doesn't support the property or method Paul Cottier Excel Programming 0 September 10th 04 01:27 AM


All times are GMT +1. The time now is 11:51 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"