Results 1 to 3 of 3

Code Problem: How to Write this into a VBA code

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-09-2006
    Posts
    147

    Code Problem: How to Write this into a VBA code

    I have recorded the below macro. However, I want to know how to write it as code. I have read on how to write a macro, but I can't grasp it. So, I thought that since I know how this macro works, that if someone can help me write it, it would make more since to me.

    I want to write it because when recording it records Range("B5:B100").Select and it want always be that range.


    Sub SETUP()
    '
    ' SETUP Macro
    '
    
    '
        sheets("DATA DUMP").Select
        Range("B2").Select
        Range(Selection, Selection.End(xlDown)).Select
        Application.CutCopyMode = False
        Selection.Copy
        Sheets("DOT 9A_DUMP").Select
        Range("A5").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Range("B4:L4").Select
        Application.CutCopyMode = False
        Selection.Copy
        Range("A5").Select
        Selection.End(xlDown).Select
        Range("B5:B100").Select
        Range("B100").Activate
        Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
            SkipBlanks:=False, Transpose:=False
        Range("A5:F5").Select
        Range(Selection, Selection.End(xlDown)).Select
        Application.CutCopyMode = False
        Selection.Copy
        ActiveWindow.SmallScroll Down:=-114
        Range("A5").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Range("A5").Select
    End Sub
    Last edited by rlkerr; 08-28-2013 at 09:55 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] IF Exists or on Error Then - Skip Code- How to write code?
    By Jack7774 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2013, 06:45 PM
  2. Trying to create vba code, which replicates other vba code within the spreadsheet
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2012, 09:31 AM
  3. Write VBA code through VBA
    By Baapi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2007, 02:52 PM
  4. Write code to Write Code
    By Kstalker in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-24-2005, 08:35 PM
  5. Code to write out all lines of code
    By davidm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-04-2005, 11:26 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1