+ Reply to Thread
Results 1 to 10 of 10

VBA error I cant figure out

  1. #1
    Registered User
    Join Date
    07-19-2012
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    24

    Angry VBA error I cant figure out

    I cant get this to work. Could one of youy magicians take a look?

    Please Login or Register  to view this content.
    When i try to run this, i get Compile error expected: list or )

    I trid to remove the IFERROR command, and it seems that its the MATCH command that is buggy.

    Please Login or Register  to view this content.


    Im so new to this, so trubbleshooting by my self is very hard


    Thanks
    Last edited by Cutter; 07-20-2012 at 10:43 AM. Reason: Added code tags

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: VBA error I cant figure out

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    07-19-2012
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: VBA error I cant figure out

    Thanks a bunch!
    Last edited by Peltz; 07-20-2012 at 08:49 AM.

  4. #4
    Registered User
    Join Date
    07-19-2012
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: VBA error I cant figure out

    How would one program it so that it didnt show up in the formula at the worksheet, but programmed directly through VBA? The point is that later in the code I delete the value im lookin up, and therefor end up with nothing, instead of the original value.
    Last edited by Peltz; 07-20-2012 at 08:52 AM.

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: VBA error I cant figure out

    The use this after to replace formula with result of formula

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-19-2012
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: VBA error I cant figure out

    Hmm.. it show up as blank? Ill look into it..

    BTW..

    When running this:
    Sheets("Utskrift").Range("J3:K4").Copy Destination:=Sheets("Utskrift").Range("J4:K4")

    It includes the formats, is it posible to run it in a way that it only extracts the value of the cell?

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: VBA error I cant figure out

    Your ranges are different sizes, is that just a typo?

    Have a look at pastespecial or
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    07-19-2012
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: VBA error I cant figure out

    This is the full code

    Yes It was A typo


    Please Login or Register  to view this content.
    The whole point is to track the history and reseting the for.
    Last edited by Cutter; 07-20-2012 at 10:44 AM. Reason: Added code tags

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: VBA error I cant figure out

    @ Peltz

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules (Rule #3) require them so please keep that in mind and add them yourself whenever showing code in any of your future posts.
    Thanks.

  10. #10
    Registered User
    Join Date
    07-19-2012
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: VBA error I cant figure out

    Solved:

    The problem with the code was that Im using a norwegian excel, and the VBA commands are english, and not recognized in the worksheet, using "norwegian" syntax in VBA vas not straight forward. Furthermore, I figuered out that writing functions in VBA with "=..." is not possible without modifications. The solution was to use makro record, and using that as a part of my code.

    Thanks for your time, much appreciated, I learned alot and had good use of the .Value command.

+ 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