+ Reply to Thread
Results 1 to 3 of 3

Macro to move code to cell, print, then move down the list to the next code

  1. #1
    Registered User
    Join Date
    05-02-2014
    Location
    Rochester, Mi.
    MS-Off Ver
    Excel 2010
    Posts
    3

    Macro to move code to cell, print, then move down the list to the next code

    We have wireless access codes in a column. If someone requires use of our guest wireless, I'd like for someone to access the spreadsheet, click on a button the prints out the access code.

    I can get the code copied to the cell which is then printed. What I can't do is get the next code in the column to be copied over and printed should the button be clicked again. I seem to get the code in the first cell in the column to keep printing or I can get it to jump to the next cell but not the 3rd.

    Also, can you turn off and on "Use Relative References" within a macro. It seems by my results it is either on or off.

    Visual of Form:

    code1
    code2

    Your wireless code is:

    Click this button to get code

    The button is clicked, 'Your wireless code is: code1' is printed.

    The button is clicked again, 'Your wireless code is: code2' is printed.

    And so on...

    If I get the proper code it appear like this on the form

    Your wireless code is: code1

    code2

    On the second click I want the code2 to copy to where code1 is.

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Macro to move code to cell, print, then move down the list to the next code

    Maybe:

    Please Login or Register  to view this content.
    I had my code generated in D2.

    My list of code was on Sheet2, A1:A10. If D2 is blank, it plops Sheet2A1. If it already contains one from the list, it instead gives the next one on the list.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    05-02-2014
    Location
    Rochester, Mi.
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to move code to cell, print, then move down the list to the next code

    Excellent. I adjusted it to my needs and it works perfectly. It moves the next code into a "form" that is promptly printed. All at the click of a button. Great, thanks.

+ 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. VB Code required to move macro to next row down cell
    By Jackt90 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-18-2014, 11:01 AM
  2. Macro Code Move Cell At Regular Time Intervals
    By paulm99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-03-2013, 05:25 PM
  3. Excel Macro Code Request for List files and Move specified directory
    By ganeshinscribe in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-19-2012, 08:38 AM
  4. Creating a macro (vba code) to move every other row
    By ctmyers in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2009, 07:18 AM
  5. Move and Delete Macro Code error
    By motown in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-22-2008, 01:31 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