+ Reply to Thread
Results 1 to 3 of 3

Code Problem: How to Write this into a VBA code

  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.


    Please Login or Register  to view this content.
    Last edited by rlkerr; 08-28-2013 at 09:55 AM.

  2. #2
    Registered User
    Join Date
    09-05-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: How to Write this into a VBA code

    This is not a direct translation of your code above, but it should help you to see how you can write the code to select a range on one sheet and paste it on another. There are ways to create dynamic ranges as well if you are not sure where exactly you need to copy from and/or paste to in a given workbook.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to Write this into a VBA code

    rlkerr,

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

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