+ Reply to Thread
Results 1 to 17 of 17

Error while executing macro

  1. #1
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Error while executing macro

    Hi Excel Gurus,
    I have macro scripts , which ..
    1. Stuck at line of DIS_IMO
    Please Login or Register  to view this content.
    (findings- it is not working when all IMOs are blanks)

    2. And, in case of 45G1 [in (1) EAL_as it is], it is converting 45 into (1) EAL_List
    File enclosed for your reference
    Seeking Excel Gurus help to rectifying errors


    K Ravindra
    Attached Files Attached Files

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Error while executing macro

    You have to find out why j = 0
    If this is the only problem, just add a check before With Sheets("IMO MISMATCH")
    to skip this section if j=0
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Error while executing macro

    I would do it like this:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Re: Error while executing macro

    Hi Keebellah,

    I have checked 1st error is eliminated , thanks for your intervention, however, 2nd error is still continuing..

    2. And, in case of 45G1 [in (1) EAL_as it is], it is converting 45 into (1) EAL_List instead of 45G1

    Please help to rectify the said error

    K Ravindra

  5. #5
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Error while executing macro

    And where do expect me to find that line of code?
    YOU are the one that knows where the data comes from, I'm sorry, this is not a VBA error as such but for you it is a result error.
    My suggestion is step through the code line byline and see where it is happening.
    Do not expect me to do that for you,
    Then tell me which part of the macro code handles this, if only this value is incorrect then it must be because of the input data and that is not a VB issue.

  6. #6
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Re: Error while executing macro

    Hi
    It is part of
    Sub EAL_T2C()
    And at line
    Please Login or Register  to view this content.
    It is converting (text to column) ISO code from (1) EAL_as it is to (1) EAL_List
    Apart from specific ISO which is alphanumeric value, all other ISOs (with numeric values ) are converting (text to column)
    values successfully.
    Can you please look into the same.

    K Ravindra

  7. #7
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Error while executing macro

    And what do you expect me to do for you? Troubleshoot ALL YOUR CODE?
    I think you can do it yourself, like I said it the data input that causes the problem.
    You seem to know the exact row and sting it happens, so that part which is not numeric is the problem.
    I am NOT going to look for that string so if you have concise infromation, then maybe I can help, but you can also write your own macro to check if it is numeric or not, if it is not numeric add code to take care of that.

  8. #8
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Re: Error while executing macro

    Hi Excel Gurus,

    I have macro naming EAL_T2Cwhich is converting text files from (1) EAL_as it is to (1) EAL_List
    And at line, it is defined as 4 characters from 26 characters are to be considered as ISO code (in each available line)
    i.e.
    Please Login or Register  to view this content.
    It is converting (text to column) ISO code from (1) EAL_as it is to (1) EAL_List
    Apart from specific ISO which is alphanumeric value, all other ISOs (with numeric values ) are converting (text to column)
    values successfully.
    Into (1) EAL_as it is ISO code may be numeric (e.g. 4510 etc.) or alphanumeric (e.g. 45G1 etc.)
    I have checked all twice but unable to fix it.

    Can anybody please help me to fix the issue.

    K Ravindra

  9. #9
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Error while executing macro

    In which row is it happening?
    What is the string?

  10. #10
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Re: Error while executing macro

    Please Ref. attached files (Image and excel file, those are self-explanatory)
    Attached Images Attached Images
    Attached Files Attached Files

  11. #11
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Error while executing macro

    I'll see what I can find and do

  12. #12
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Error while executing macro

    well I think if you had concentrated on it you would have found it.
    Your code
    Please Login or Register  to view this content.
    Corrected (I hope )
    Please Login or Register  to view this content.
    VAL ONLY extracts numbers

  13. #13
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Re: Error while executing macro

    Thanks Keebellah,
    Seems correct , I'ill check and revert with findings..

  14. #14
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Error while executing macro

    And, have you verified?

  15. #15
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Re: Error while executing macro

    Keebellah,
    The said error has been rectified , however, the new error taking place..
    In case of IMO mismatch , list is populated / appearing in Index sheet (starts from B3) instead of IMO Mismatch worksheet (to be started from B3)

  16. #16
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Error while executing macro

    My guess is that your code does not correctly reference worksheets and cells.
    Take it line by line while executing.

  17. #17
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,937

    Re: Error while executing macro

    Nothing in B3 here.
    Your explanation does not tell ME anything so ...
    Need help make sure you explain it exactly and what to check for what you have what you expect and what the macro is supposed to do.
    YOU are the one that wrote (I hope for you) the macro and knows what it should do, do not expect anyone else to try and guess what you would like to happen.
    Communication, that is really important

+ 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] ADO Error While Executing Command To Recordset
    By NeedForExcel in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-11-2015, 07:34 AM
  2. Sql not executing, insert into syntax error
    By sagar.rajula in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-14-2013, 06:31 AM
  3. #Value Error when Executing Formula
    By DHartwig35805 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-18-2013, 03:50 PM
  4. Getting error while executing VBA Code
    By Sahil1087 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-09-2012, 02:53 AM
  5. Compile error: Procedure too large. Executing macro via hyperlink.
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 06-03-2011, 10:07 PM
  6. Error while executing a procedure.
    By 06035 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-31-2008, 03:26 PM
  7. [SOLVED] Error 400 on executing macro first time in terminal server
    By gimme_this_gimme_that@yahoo.com in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-16-2006, 05:25 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