Excel and Visual Basic

Discussion in 'Software' started by Cochese, Feb 9, 2007.

  1. Cochese

    Cochese Specialist

    I'm trying to make a button so I can just copy from specific cells in one sheet to specific cells in the next like:

    copy cells E26-E31 in sheet1 to cells E26-E31 in sheet2

    but I don't really understand how to make the script for it. Anyone have any knowledge on VBScripting?


    Excel 2002
    VB 6.3

    Should this go into programming?
     
    Last edited: Feb 9, 2007
  2. Cochese

    Cochese Specialist

    Managed to do it with this:


    '
    '
    '

    '
    Sheets("DAILY1").Select
    Range("E26:I31").Select
    Selection.Copy
    Sheets("DAILY2").Select
    Range("E26:I31").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
    xlNone, SkipBlanks:=False, Transpose:=False
    End Sub


    Seems to work.
     
  3. jewlzs

    jewlzs Corporal

    I read your script there is no additional formula functions there is no if statement function you are not skipping blanks transposing just simply rewrote the paste link function.

    Scrap the script format all the cells with paste link.
    Once the worksheet is reformatted the paste link will remain until you delete it.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds