Consulting

Results 1 to 3 of 3

Thread: 'Run time error 438 Object does not support this property or method

  1. #1

    'Run time error 438 Object does not support this property or method

    Sub SaveAndClear()
    Dim LastItemRow As Long, FirstDBRow As Long, TotalRows As Long
    With Sheet1
       LastItemRow = .Range("K9999").End(xlUp).Row 'Last Item Row
       TotalRows = LastItemRow - 9 'Total Items
         FirstDBRow = Sheet3.Range("A99999").End(xlUp).Row + 1 'First Avail Row
         Sheet3.Range("A" & FirstDBRow & ":A" & FirstDBRow + TotalRows - 1).Vavue = .Range("M5").Value 'Receipt #
       Sheet3.Range("B" & FirstDBRow & ":B" & FirstDBRow + TotalRows - 1).Vavue = .Range("M6").Value 'Order Date
       Sheet3.Range("C" & FirstDBRow & ":C" & FirstDBRow + TotalRows - 1).Vavue = .Range("M7").Value 'Cashier
       Sheet3.Range("D" & FirstDBRow & ":G" & FirstDBRow + TotalRows - 1).Vavue = .Range("K10:N" & LastItemRow).Value 'All Item Detail
       .Shapes("FooterGrp").Visible = msoFalse 'Hide Footer Group Shape
       On Error Resume Next
       .Shapes("ItemPic").Delete
       On Error GoTo 0
       .Range("K10:N9999").ClearContents
       .Calculate
       .Range("M5").Value = .Range("B7").Value 'Next Receipt #
       .Range("B6,E3:F3,F6,F8,I7").ClearContents 'Clear Item Fields
       .Range("E10").Select
    End With
    End Sub
    Attached Images Attached Images
    Last edited by Aussiebear; 03-31-2023 at 07:10 AM. Reason: Added code tags to supplied code

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,875
    Vavue should be Value
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    Thanks boss appreciate

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •