Posts by Krosta8

    Hello everyone,


    I'm trying to make an upgrade to my code, but I have no idea how to do this with other dependencies to this code.
    The code now works like this:
    Choose Folder and in this folder grab all files with extension .par.
    Each imported .par file is on its own sheet and the name of the sheet is name of imported file. (Example: Name is Test.par and sheet name is the same - Test.par) Problem is with long names of the files.


    I need to be able to choose the order of the files (Like an array), just to click on them in order of importing to the sheets. (Sub process is using the order of sheets).


    Next problem is with the long names of files.

    • I need to import the name (for example) to Cell 1,1.
    • Another sub process is searching for cells on this sheets and I need to be able to refer to the name of the sheet.
      Example: I'm searching for cell value "Car", the process find the cell value "Car" on sheet "Toys" and I need to do something like this - FindedCell.Worksheet.Cells(1,1).Value
      The result of this should be, that FindedCell is on sheet "Toys".

    I tried to do the best description, which I could.:duck:


    Thank you a lot for every help! :)


    Here is code for import all .par files in folder:


    Here is code for creating new book with every .par files

    I would like to thank you. I didn't know about the reaction on this topic, because I was three weeks away from everything and then I didn't see the notification. I figured it out on myself and it is almost the same code, like you suggested.


    Thank you very much, for your help and sorry for this very late respond.

    Hello guys,


    I need a little help with my code.
    The final version of the code will be for renaming of column's headers through Userform.
    I have a code to automatically generate TextBoxes of every used column (only the first row for each column) and insert the values to them.


    Then I generated another (blank) TextBoxes, where I want to insert text and the text should rewrite original column's headers.


    I don't know how to address to this generated TextBoxes.


    Any help would be appreciated.


    Here is my code:


    [ATTACH=CONFIG]74025[/ATTACH]

    Hello guys,


    I need to generate textboxes for every first cell in each column (already working), but I need to have these generated textboxes in a column (or columns, every column up to 15 textboxes). Sometimes there should be more then 120 columns.


    After this I need to be able to change the text in textboxes and input it to the sheet via CommandButton.


    Any help you can offer would be hugely appreciated.


    forum.ozgrid.com/index.php?attachment/73871/

    Hello guys,


    I need to make code for automatic creating of chart, which has to look like the one in the workbook.


    The number of columns won't be same. Sometimes 30 columns and sometimes 50 columns and so on.
    The number of rows will be from 100 to "infinite".


    I also need to be able to choose which columns should appear in final chart.
    Y axes will always be column "A"


    The final chart should be created in to new workbook.
    I added sample book with final chart, that I need.


    Any help you can offer would be hugely appreciated.[
    ATTACH]73855[/ATTACH]

    Re: RowIndex count match only with visible rows


    Now it is working, perfect!


    Thank you very much for your help!


    Just a small question..
    I put a date value to the list (from userform), where I have a conditional formatting, but the condition is not used for the value. I need to manually rewrite the date and then the conditional formatting is used.


    I mean the column G.


    Do you know a reason of this problem?

    Re: RowIndex count match only with visible rows


    Here it is:
    1 Drátek
    2 Kabel
    3 Pravítko


    The main column is the 1st column, the 2nd. column is just an "addition".


    I tried every option with the columns (1 or 0), but now I'm getting another error:
    Run-Time error "13"

    Re: RowIndex count match only with visible rows


    The error is in German:
    Original:
    Laufzeitfehler "1004":
    Anwendungs - oder objektdefinierter Fehler
    In english:
    Run-time error "1004":
    Application - or object - defined error


    I don't know, what exactly you want from me about the ComboBox3. Can you, please, be more specific?

    Re: RowIndex count match only with visible rows


    I tried to do every combination, which you wrote, but still error.


    With the first two variants I got the error again on this line:

    Code
    UserForm1.txtLabel.Text = .Cells(RowIndex, 1)


    With the second two variants I got the error on the changed line:

    Code
    RowIndex = Application.Match(ComboBox1.Column(0), Sheets("Položky").Columns(0), 0


    I found out, that the first column is in Czech Office "0" too, because the second column is "1".


    Do you have any other ideas? :/

    Re: RowIndex count match only with visible rows


    The combination is made in this way:

    Code
    Dim cbRange As Range
        Dim LR As Long
        LR = Range("A" & Rows.Count).End(xlUp).Row
        Me.ComboBox3.Clear
        With ComboBox3
            For Each cbRange In Range("A6:A" & LR).SpecialCells(xlCellTypeVisible)
              .AddItem cbRange.Value
              .List(.ListCount - 1, 1) = cbRange.Offset(0, 1)
            Next cbRange
        End With


    I attach a sample workbook, something is in Czech, but I think, that it is OK to understand the code without any problem.


    I know, that my code is a mess in this moment, but I want to "clean it" later (or try to clean it) :D
    forum.ozgrid.com/index.php?attachment/73621/

    Re: RowIndex count match only with visible rows


    What is the sheet name of the sheet used for the combo box list?
    "Položky"


    Which sheet column in that sheet is used to populate your combo box list?
    Column A and B


    Are the values in that column unique?
    In the column, which is used to populate my combo box list, yes.

    Hello guys,


    I made filtered ComboBox, which is done by using SpecialCells(xlCellTypeVisible), but now I have a problem with data paste. RowIndex, which I use for this, count all rows, not just the filtered rows. Is there a way, how to do something like this:
    RowIndex.SpecialCells(xlCellTypeVisible) = Me.ComboBox1.ListIndex ?


    Here is the code, which I need to "repair"


    Any help you can offer would be hugely appreciated.


    Re: Find first missing number in a sequence, filtered combobox based on value


    Hello,
    sorry for late response.
    I had a look at it, but i think, that I'm not able to adapt this code to my case.
    I attached again the warehouse system, just with changes in column "Comment". I need to have code, which will show (depend on column "Comment") list of items in Combobox.
    For example:
    In Combobox1 I will see only items, which have in column "Comment" text "OK" and be able to choose them.
    Is this possible to do this?


    Thank you again for help :)