Results 1 to 4 of 4

Thread: I want to copy a value from a previous sheet, every day.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Newbie
    Joined
    Feb 2022
    Posts
    1
    Location

    I want to copy a value from a previous sheet, every day.

    Hi everybody,

    See file : I have an automatic copy of the sheet "Padrão" with an automatic filename = the date of the day.
    All coded. This commandbutton is not show on the file.
    To past the value of I35 to the next day in the cellI I34, i do it manually.

    I will this coded.

    My code to try this :

    Private Sub CommandButton1_Click()
    ‘Creation of the formula in a cell Range(“I34’”)  of today’s sheet
                    Dim Fname As Variant
                    Fname = Format(Date - 1, "DD-MM-YYYY")
    ‘ Select  yesterdays sheet (sheetname is Fname), select a cell  value
                    Range("I35").Select
    ‘ Sheet of today
    ‘Past formula in the sheet of today in cell “I34”    
                    ActiveCell.FormulaR1C1 = "='fname'!R[1]C" (This doesn’t work!!!!!)
    End Sub
    This should be done every day automatically.

    I need some help.
    Attached Files Attached Files
    Last edited by Aussiebear; 02-05-2022 at 01:49 PM. Reason: Added code tags to supplied code

Posting Permissions

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