+ Reply to Thread
Results 1 to 3 of 3

Quick Help w Macro

Hybrid View

  1. #1
    Registered User
    Join Date
    04-10-2017
    Location
    california
    MS-Off Ver
    2017
    Posts
    27

    Lightbulb Quick Help w Macro

    Hi all, I have the following macro in place - it's giving me the subscript out of range error when I run it. is there something wrong with this (recorded) code?



    Thanks for any help in advance!


    Sub photo()
    '
    ' photo Macro
    '
    
    '
        ActiveWindow.ActivateNext
        ActiveWindow.ActivateNext
        Cells.Select
        Selection.Copy
        ActiveWindow.ActivateNext
        ActiveWindow.ActivateNext
        Sheets("Photo Documentation").Select
        Cells.Select
        ActiveSheet.Paste
        Range("E71").Select
        ActiveWindow.SmallScroll Down:=3
    End Sub
    Last edited by alansidman; 06-27-2017 at 03:16 PM. Reason: code tags added

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Quick Help w Macro

    1) merit:
    instead of
    ActiveWindow.ActivateNext
    ActiveWindow.ActivateNext
    you may try (if workboooks are open in one excel instance - but probably they are not):
    Worbooks("myworkbookname.xlsx").activate
    if in several separate instances (more probable in your case), it will be a bit more complicated.
    Nice (but not too simple) solution - see https://stackoverflow.com/questions/...ances-of-excel ) or simpler: https://www.mrexcel.com/forum/excel-...ml#post1074378

    2) administrative (also very important):
    Please DO read and follow our https://www.excelforum.com/forum-rul...rum-rules.html
    This is short set of rules. But in one post you broke two (1st and 3rd). Please edit your post and correct title + use code tags
    Best Regards,

    Kaper

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,752

    Re: Quick Help w Macro

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE] [/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)


    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 go to your first 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)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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] Quick help with a Macro Error
    By B_Jarbs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2016, 01:06 PM
  2. Help creating quick macro - thanks!
    By skipper24 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-06-2015, 07:26 PM
  3. quick sort macro
    By LMHmedchem in forum Excel General
    Replies: 9
    Last Post: 03-26-2014, 05:26 PM
  4. [SOLVED] Quick question about automatic row deletion (should be very quick and easy!!)
    By poptart141 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-09-2013, 12:56 PM
  5. Need Quick Macro Help!
    By bxc2739 in forum Excel General
    Replies: 2
    Last Post: 04-24-2006, 03:32 PM
  6. Quick question - quick answer about assigning shortcut keys
    By funkymonkUK in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-13-2005, 06:05 AM
  7. quick lil macro
    By ChasePenelli in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-29-2005, 08:05 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