Results 1 to 5 of 5

Thread: VBA : Input form : Copy column and paste special value in another column

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Newbie
    Joined
    Oct 2023
    Posts
    1
    Location

    VBA : Input form : Copy column and paste special value in another column

    Hello


    I'm quite new to VBA .
    I'm trying to do a Input form with VBA


    I have 3 sheets

    Sheet1 : Input
    Sheet 2 : Sheet3
    Sheet 3 : Cal

    I have two macros which work with a insert button :


    Sheet1 = Input - Sub OneCell()
    Sheet2 = Sheet3 - Sub ok()


    Sub OneCell()
    Sheets("Input").Range("c3:c9").Copy Sheets("Sheet3").Range("b3:b9")
    Sheets("Input").Range("c3:c9").ClearContents
    End Sub

    and

    Sub ok()
    Sheets("Sheet3").Range("c3:c9").Copy
    Sheets("Cal").Range("c3:c9").PasteSpecial Paste:=xlPasteValues
    Sheets("Sheet3").Range("b3:b9").ClearContents
    End Sub

    For the Macro Sub ok(), I would like to have the same code but which will paste the value in the the following empty columns in Sheet Cal
    such as pasting the values starting in c3:c9 then pasting the following values in d3:d9 and so on

    Is what something possible ?


    Thanks in advance
    Last edited by Aussiebear; 10-11-2023 at 01:04 PM. Reason: Added code tags and reduced the whitespace

Posting Permissions

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