Results 1 to 13 of 13
  1. #1
    2 Star Lounger
    Join Date
    Feb 2007
    Location
    Vienna, Wien, Austria
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi all,

    i have a workbook, where i can handle some dataimport. The question now is, if there is a possibillity to walk throug the import, showing the progress.
    In the attached workbook i should have all the code and userforms needed. My problem is to connect the import module with the progress-userform.
    I found a formula to get the percentage per opended (ok, the base is, that we think, every opened workbook in a directory contains data, so the y can be imported) workbook, but coudnīt get it out, how to connect the formula in the code with the progressbar to show the progress per workbook....
    i know, its tricky, but if anyone of You has an idea, any help would be appreciated.

    thanks,
    stefan
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You have to place the code of the import routine in the AddDataToWKS procedure (using the wksDest variable).
    See the attached version.
    Attached Files Attached Files

  3. #3
    2 Star Lounger
    Join Date
    Feb 2007
    Location
    Vienna, Wien, Austria
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thats awesome!!! You are using the -> dblStep = parameter.Cells(7, 3) to get the Percentage. I can replace it still in the code, using the function, eh?! I guess, thasts what i should do. thank You, Hans!!!!!!

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You can calculate the percentage in another way in the code, of course.

  5. #5
    2 Star Lounger
    Join Date
    Feb 2007
    Location
    Vienna, Wien, Austria
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts
    anyway, i like the way You solve problems, thank You again!

  6. #6
    2 Star Lounger
    Join Date
    Feb 2007
    Location
    Vienna, Wien, Austria
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts
    last addition: the formula i used for counting files in a folder work in office 2007 as well as the fso filesearch does not work anymore... as i tested.

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Application.FileSearch doesn't work in Office 2007, but FileSystemObject should work there - it is a Windows object, not an Office object. What exactly is the problem? Do you get an error message, and if so what does it say?

  8. #8
    2 Star Lounger
    Join Date
    Feb 2007
    Location
    Vienna, Wien, Austria
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i only get the errormessage with the formula, that there is no solution...
    i only wanted to tell You, that i tested some formulas to get a solution work in excel 2007 as well as i use 2003 and 2007 parallel. thats all. i searched some time to find the working formula.

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    OK, thanks.

  10. #10
    2 Star Lounger
    Join Date
    Feb 2007
    Location
    Vienna, Wien, Austria
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts
    as last annoying question: how may i get the number of opened fils into the progressbar?

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Does this version do what you want?
    Attached Files Attached Files

  12. #12
    2 Star Lounger
    Join Date
    Feb 2007
    Location
    Vienna, Wien, Austria
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts
    well, it does it instead of the percentage. is it that easy to insert another textfield into the userform with the other count formula?
    - > i wanted it as an addition to set the absolute number in top of the progressbar...
    regards, stefan

  13. #13
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You can place another label on the frmProgress userform, and set its caption in the UserForm_Activate event procedure.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •