+ Reply to Thread
Results 1 to 6 of 6

Typing vs Pasting Code

Hybrid View

  1. #1
    Registered User
    Join Date
    05-21-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    6

    Typing vs Pasting Code

    Hi All,

    I am new to the VBA world, so bare with me and my extremely simple question...
    Why is it that when I physically type:

    Range("A1").End(xlDown).Select

    I get error 1004 (application defined or object defined error)
    Yet, when I type it out in notepad, and paste it into the window, it works perfectly fine...

    Thanks in advance for your help

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Typing vs Pasting Code

    your vba editor has problems, does autocomplete run while you are typing ?
    If solved remember to mark Thread as solved

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Typing vs Pasting Code

    Hi, patel45,

    could you please elaborate how pasting in code into the VBE overcomes the "vba editor has problems"? Thanks

    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Typing vs Pasting Code

    Hi GaPhilthy,

    Is that line is the only code line between Sub.... End Sub ?

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  5. #5
    Registered User
    Join Date
    05-21-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Typing vs Pasting Code

    Most of the time, my AutoComplete, Does not autocomplete.... Othertimes it will... it is almost like its just slow and most of the time im finished typing the word out before it tries to offer suggestions.

    dilipandey - yes that is the only line of code I had beween sub... endsub... (with Rows 1-30 having entries in column A)

    Thanks guys... I think there just might be something wrong with my vba editor on this computer

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Typing vs Pasting Code

    Okay.... did you tried any other computer ? Are you facing same issue on other computer as well ?


    Regards,
    DILIPandey
    <click on below * if this helps>

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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