Selection.PasteSpecial Paste:=-4163, Operation:=-4142, SkipBlanks:=False, Transpose:=False for Excel 2013

I use the above statement to paste from one excel file to another in Access application.
It works for machine installed with Excel 2007 and Excel 2010 but not for Excel 2013.
The error message is "Error Number 9, Subscript out of range".
Kindly advise. 
Thank you.
TS Lim

Hi,
For the error message:
<< Error Number 9, Subscript out of range
About this error, it often implies that you are trying to refer to an object that doesn’t exist. Usually it caused by name which is not existing in the workbook. You can get more detailed information about this error in the following link.
https://msdn.microsoft.com/en-us/library/aa264519(v=vs.60).aspx
Have you checked the sheet name in you code, does it match the name in your workbook? If it still doesn’t help, can you share the sheet or post your code for us to reproduce this issue if it is convenient?
Best Regards
Lan
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Error when select sheet for Excel file from Excel 2013 with visual basic

    Dim AppXL As Object
    Dim MyWorkBook as Object
    Set AppXL = CreateObject("Excel.Application")
    Set MyWorkBook = AppXL.Workbooks.Open("E:\MyFile.xls)
    AppXL.Sheets("Sheet1").Select
    The above code run with no problem when use in machines with Excel 2007 and Excel 2010.
    But when run in machine with Excel 2013,  error with "Out of Range" occur. Kindly advise for any solution.
    TS Lim

    With your highlight on the AppXL.Workbooks.Open, I have solved the problem by re-position the statements.
    Below are the 2 situation which works in for Outlook 2007, 2010 and 2013
    Situation 1, work for Outlook 2007 and 2010 but d not 2013
    With AppXL  
        Set WorkBookFrom = AppXL.Workbooks.Open("E:\MyFile.xls")
    Set WorkBookTo = AppXL.Workbooks.Open("E:\MyFile2.xls")
      WorkBookFrom.Activate
        .Sheets("Sheet1").Select
        .Range("A1:IV65536").Select
        .Selection.Copy
            WorkBookTo.Activate
        .Sheets("Sheet1").Select
        .Selection.PasteSpecial Paste:=-4163, Operation:=-4142, SkipBlanks:=False, Transpose:=False
        .Range("A1").Select
          WorkBookTo.Save
    End With
    Situation 2, work for Outlook 2007 and 2010 and  2013
    With AppXL  
        Set WorkBookFrom = AppXL.Workbooks.Open("E:\MyFiel.xls")
      WorkBookFrom.Activate
        .Sheets("Sheet1").Select
        .Range("A1:IV65536").Select
        .Selection.Copy
    Set WorkBookTo = AppXL.Workbooks.Open("E:\MyFile2.xls")
            WorkBookTo.Activate
        .Sheets("Sheet1").Select
    .Range("A1").Select
        .Selection.PasteSpecial Paste:=-4163, Operation:=-4142, SkipBlanks:=False, Transpose:=False
          WorkBookTo.Save
    End With
    Thank you for indirectly  help me to solve the problem.
    TS Lim

  • Select options -restricting the operator value options.

    Hi,
    In selection screen for the  select options or parameter declarations  I need to restrict the operator options , like when they click for any select options it will give options to select = , #, <, <= , > , >=
    all these options right.
    I would like to restrict the user  to select only > and >=  while passing values.
    Can anyone give me idea how I can approach this?
    Thanks in advance.

    Hi,
    use this FM...
    SELECT_OPTIONS_RESTRICT can be use to supress options available with a SELECT-OPTIONS on a selection screen.
    jusy copy the code and execute it....It will give the exact output what u want.....
    TYPE-POOLS sscr.
    TABLES : marc.
    *Define the object to be passed to the RESTRICTION parameter
    DATA restrict TYPE sscr_restrict.
    *Auxiliary objects for filling RESTRICT
    DATA : optlist TYPE sscr_opt_list,
    *** TYPE sscr_***.
    *Defining the selection-screen
    SELECT-OPTIONS : s_matnr FOR marc-matnr,
    s_werks FOR marc-werks.
    INITIALIZATION.
    *Restricting the MATNR selection to only EQ and 'BT'.
    optlist-name = 'OBJECTKEY1'.
    optlist-options-eq = 'X'.
    optlist-options-bt = 'X'.
    APPEND optlist TO restrict-opt_list_tab.
    ***-kind = 'S'.
    ***-name = 'S_MATNR'.
    ***-sg_main = 'I'.
    ***-sg_addy = space.
    ***-op_main = 'OBJECTKEY1'.
    APPEND *** TO restrict-***_tab.
    *Restricting the WERKS selection to CP, GE, LT, NE.
    optlist-name = 'OBJECTKEY2'.
    optlist-options-cp = 'X'.
    optlist-options-ge = 'X'.
    optlist-options-lt = 'X'.
    optlist-options-ne = 'X'.
    APPEND optlist TO restrict-opt_list_tab.
    ***-kind = 'S'.
    ***-name = 'S_WERKS'.
    ***-sg_main = 'I'.
    ***-sg_addy = space.
    ***-op_main = 'OBJECTKEY2'.
    APPEND *** TO restrict-***_tab.
    CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
    EXPORTING
    restriction = restrict
    EXCEPTIONS
    too_late = 1
    repeated = 2
    selopt_without_options = 3
    selopt_without_signs = 4
    invalid_sign = 5
    empty_option_list = 6
    invalid_kind = 7
    repeated_kind_a = 8
    OTHERS = 9.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Regards
    Kiran

  • How can write select statement inside case operator

    Hi all,
    I like to write a query which get result from other table in case operator.
    e.g
    select a,b,c from dual
    where a=1
    and b=case when b is null then "select any value from other table" else null end;
    Please help me to write this query.
    Thanks

    sorry, but thats funny.
    You ask for case with subquery and choosed a solution with decode as correct.
    Furthermore, the solution proposed might not be so useful.
    First of all many people prefer case over decode, because of understandability and readability of the code (toad has this as a coding rule built in too)
    Secondly in this case the decode does nothing. Take a closer look:
    select a,b,c from tableA a
    where a.a = 1
    and a.b =(select decode(a.b,null,( select 1 from tableB b where rownum = 1 ),a.b) from dual)the decode chooses the subselect if a.b is null. But if a.b is null the a.b on the left side is null also, so the predicate will never be true.
    aside from this, you can write this shorter as
    a.b=nvl(a.b,(select 1 from tableB b where rownum = 1))so what will work in such a case might be
    ANEXPRESSION(Literal, scalar subquery, ...) =nvl(a.b,(select 1 from tableB b where rownum = 1))otherwise look for a solution with case ;-)
    regards
    Edited by: chris227 on 12.05.2012 02:12

  • Select/Copy/Paste

    Why is it that when I have a photo open in CS4, the photo in this case is 13" x 11". I Select / All / Copy and paste it into a document that's 12" x 18", the photo is now reduced in size to a couple of inches wide. Why can't I set the image size and then Select/ Copy/ Paste and have it paste as that same size?
    Bob

    As John says, the resolution is different. In this case, just add an additional keystroke to the mix: Ctrl+A (Select All), Ctrl+C (Copy), switch images, and Ctrl+V (Paste), then add Ctrl+T (Free Transform). I just did a bunch of video images, and did add a Ctrl+W (Close) for the first image. I just held down the Ctrl key, and did A, C, W, V T, and I was ready to Transform, as was needed to match up to my NTSC 720x480 16:9, PAR = 1.2121. Took moments, and then I just did a Shift+corner drag to Transform my images.
    Good luck,
    Hunt

  • I took a picture while in a text. I then seleceted it and it gave me four selection (cope, paste, select, and suggest..). What is the suggest option?

    I took a picture while in a text. I then seleceted it and it gave me four selection (cope, paste, select, and suggest..). What is the suggest option?

    After you tapped the picture, it brings up the copy, paste, dialog box. This would be important if you wanted to copy the picture and paste it in another application.
    Okay, I went to check to see what else you were talking about with suggest. What that is referring to is about sugguesting how much of the area to copy. Since there was more in the message than the picture, you could choose to copy more than the picture. Nothing much to do or worry about.

  • When using the online editor in our wordpress blog on any other online editor I get this error "Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl+X)" Please help.

    I have online editors for our blog and websites for generating articles and blog posts. Different editors from different sites and programmers. Firefox doesn't allow me to use the cut/paste/copy functions with these editors. I get this message or something similar every time. "Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl+X)"

    See:
    *http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard
    *https://addons.mozilla.org/firefox/addon/852 - AllowClipboard Helper

  • HT4623 I have plugged in my ipad to my computer and Itunes is up on my computer but where do I find these things in Itunes, # In iTunes, select your device.  # In the Summary pane, click Check for Update, to update my ipad?

    I have plugged in my ipad to my computer and Itunes is up on my computer but where do I find these things in Itunes, # In iTunes, select your device.  # In the Summary pane, click Check for Update, to update my ipad?

    Tap to enlarge.

  • How can I edit photos in iPhoto in Photoshop Elements?  I select PE in iPhoto preferences but they stay in iPhoto for editing.

    How can I edit photos in iPhoto in Photoshop Elements?  I select PE in iPhoto preferences but they stay in iPhoto for editing.

    Here's something you can try with a copy of your current library.
    1 - go to iPhoto's Events preference pane and set the auto split option to 1 day per even.
    2 - go the the Events mode, select all Events.
    3 - go to the Events menu  and and select Autosplit Selected Events.
    which will give you an event for each day.
    4 - again select all events (although it might be better do to fewer at a time) and export them to your desired destination via the File ➙ Export ➙ File Export  menu option with the following settings:
    The workflow above will produce a folder for each days photos with the date as the folder's title.

  • Windows Server 2012 R2 Fax Service - Windows 7 Client "You do not have permissions to complete this operation. Contact your fax administrator for more assistance"

    First I have tried all sorts of searches and and all I come up with is things related to Windows Server 2008.
    1. I have Fax Service running on my 2012 R2 File and Print Server.
    a. It can send faxes from the logged in domain user
    b. It does not need to receive faxes because we have another machine for that
    2. I have added the domain user I am using on the Windows 7 machine to the Accounts List in Fax Manager
    3. I can not seem to find any logging saying that there is a security problem (Event Log, etc...)
    Please point me in the correct direction as I need to have my staff use Print to Fax from our Practice Management Application.

    Hi Shawn,
    à
    You do not have permissions to complete this operation. Contact your fax administrator for more assistance
    From the error message, please check if share the Fax on the server. Meanwhile, please also check if assign
    correct permissions in Security tab under Fax properties.
    If any update, please feel free to let me know.
    Hope this helps.
    Best regards,
    Justin Gu
    1. Fax Sharing is enabled and can see the Shared Fax Printer on other machines.
    2. At least 2 domain groups that the Windows 7 user is in are in the Security Section, set to be able to fax. One othem can manage fax.

  • The file size of selected file in input file control is shown as 0 for multiple file selection in Safari 5.1

    The file size of selected file in input file control is shown as 0 for multiple file selection in Safari 5.1. If you select single file, then it is able to return file size correctly. However, if you select multiple files, then the file size of each of the selected file is always returned as 0 from javascript. This works correctly in Safari 4.0 but it does not work in Safari 5.1.
    How do I get the correct file size in Safari 5.1 ?

    If you want to post (or send me) a link to the lrcat file, I'd take a look at it for you, and give you a break-down what's consuming all the bytes. But it might be fun to learn how to do that yourself (e.g. using SQL). I use SQLiteSpy, but other people have their favorites.. (or you can use a command-line client if you prefer..). One way: just run "drop table "{table-name}" on each table then look at filesize (do this to a copy, not the real thing).
    Anyway, it's hard to imagine keywords and captions etc. taking much of the space, since even if you had 1000 10-character words of text metadata per photo average that still only adds up to 117MB, which isn't a substantial portion of that 8G you're seeing occupied.
    Anyway, if you've painted the heck out of most of them and not cleared dev history, that'll do it - that's where I'd put my money too...
    One thing to consider to keep file-size down:
    ===================================
    * After reaching a milestone in your editing, take a snapshot then clear edit history, or the top part of it anyway (e.g. leave the import step), using a preset like:
    Clear Edit History.lrtemplate
    s = {
        id = "E36E8CB3-B52B-41AC-8FA9-1989FAFD5223",
        internalName = "No Edit",
        title = "Clear Edit History",
        type = "Develop",
        value = {
            settings = {
                NoEdit = true,
            uuid = "34402820-B470-4D5B-9369-0502F2176B7F",
        version = 0,
    (that's my most frequently used preset, by far ;-})
    PS - I've written a plugin called DevHistoryEditor, which can auto-consolidate steps and reduce catalog size - it's a bit cumbersome to use a.t.m. but in case you're interested...
    Rob

  • Which option do I have to select If I buy the latest iPad with cellular feature for international use? If I choose verizon can I just change the sim card and insert one from another country?

    Which option do I have to select If I buy the latest iPad with cellular feature for international use? If I choose verizon can I just change the sim card and insert one from another country?

    I would guess you need the A1460 model
    see here
    http://www.apple.com/ipad/LTE/

  • Secondly, i used migration assistant to move everything from old laptop to new. when i used pages on new machine, 10.8.5 operating system, there is no click for file save as in the menu, only flle save. why?

    secondly, i used migration assistant to move everything from old laptop to new. when i used pages on new machine, 10.8.5 operating system, there is no click for file save as in the menu, only flle save. why?

    Hold down Option key while clicking on menu bar and Save as will appear.

  • Hi I am in travel and I use from Iran operator. but my iphone is locked for it. please open it for me

    hi I am in travel and I use from Iran operator. but my iphone is locked for it. please open it for me or help me anyway can please

    Since the iPhone is not officially sold in Iran, & there are no supported carriers there, you couldn't have an iPhone locked to a carrier in Iran.
    At any rate, if you do have a carrier locked iPhone, you need to contact the carrier the phone is locked to to get it officially unlocked. No one here can help you, nor can/will Apple.

  • Selecting the tray or the roll as the paper source for printing

    my printing machine is a canon ipf 5100.With Aperture 2 it was easy to select "tray" or "roll" in the printer driver.With Aperture 3 it is impossible because their is no such option in the Aperture 3 driver.I have tried to download the last version of the ipf 5100 printer driver but Aperture 3 doesn't take it.What can i do to recover my options "tray" or "roll" for my choice of paper?

    Your wording has me confused. You said you were unable to select tray or roll in the printer driver originally. I showed you where the roll selection is; if you do not select roll in the driver, then it will use tray for all the other selections are cut-sheet paper.
    You last message says you can only select roll in the printer. Make these selections on the computer from the print driver, not the physical printer.

Maybe you are looking for