Posts by emrena

    Re: Delete Macro


    Quote from MrkFrrl

    Are you getting some errors? If so, what are they? What happens when you try to step-through the code (hit the key F8 to advance one line at a time in VBA). Are you getting a compile error? If you do a ThisWorkbook.Save before the procedure that bugs out, does it make any difference? Need more info to be sure what's going on.


    thanks but i'm not getting any errors. no compile errors too. don't think my codes are the problem. it is just that when i try importing text files the field will be grayed out. i tried saving it and but i still cannot import the data into row 16.

    Re: Delete Macro



    this is a snippet of the script. so after running the script the number of rows will be reduced. eg. row 1 to 15 instead of row 1 to 22 before running the macro. but when i try to import text file into row 16, the import text file function will be grayed out. so i was thinking what would be the cause? is it because that excel memory remembers there is a macro in that cell before? how do reset/ format or delete the macro in that cell?

    after importing data (data >> get external data >> import text file) and running a macro that contains

    Code
    Cells(i, 5).EntireRow.Delete Shift:=xlShiftUp

    . i cannot insert any data into the next column below. why is this so? is it because of the excel memory that remembers that a macro has been previously ran in that cell before?


    example i import text file into B1 then the data will be imported into different cells using delimiters. the data will occupy from row 1 to 22. after i run the macro which combines fields with similar data the data will occupy row 1 to 15. then when i try to import data into B16. the "import text file" option will be grayed out. why is this so? how do i solve the problem?

    I want to write a macro that is able to copy the 5th position to the 10th position characters from one cell to another. For example, in Cells(B1) contains: Mon Jan 8 09:00:02 2007. Then I want to copy "Jan 8" to Cells(A1). How do I do that? Also, i am not supposed to hardcode the cells. The codes should look something like that


    start = [ib]*[/ib]....
    end = InputBox...


    [vba]For i = start to end
    Cells(i,"A").Value = (whatever function to copy 5th to 10th char of Cells(i,"B")).......
    Next i[/vba]