Consulting

Results 1 to 16 of 16

Thread: Recopy Without Duplicate And Insert In Form

  1. #1

    Recopy Without Duplicate And Insert In Form

    in the column K and L are present many date.

    My problem:
    copy in M only the date not present in L.
    After this insert the list of new date finded in the userform2...

  2. #2
    BoardCoder VBAX Regular
    Joined
    May 2004
    Location
    Istanbul, Turkiye
    Posts
    73
    Attached workbook works as you need when you load the userform.

    There are 3 dynamic range names in workbook that points to K, L and M column data (KData, LData, MData).

    It simply compares the values in K and L columns then copies the new data in K to M column then sets Listbox RowSource as the M column data range. All these happen in userform initialize event procedure so you have to load (run) userform to see what happens. And it will always clear the M Column when you run the userform.

    Suat

  3. #3
    big code!

    Add an other little modified:

    after the form is populated with the list of the date is possible:

    select one date in trhe form and with to use of the botton "CARICA TABULATO" to assign a macro...

    example...

    i select 12/08/2004

    after this operation click on the button "CARICA TABULATO"

    take this date and put in one variable ie. VAR_DATE

    after this, mantain the variable in the memory, and call an other macro i.e. sub my macro ()

    tks for patience...

  4. #4
    BoardCoder VBAX Regular
    Joined
    May 2004
    Location
    Istanbul, Turkiye
    Posts
    73
    OtherMacro is in Module1 as sample. It basically takes selected date variable as parameter and executes a simple operation by clicking on the button after selecting a date in listbox.

    Suat
    (Removed previous attachment in my post since I uploaded the new one)

  5. #5
    woh!!!!!!!!!!!!!!!!!!!!!!!

  6. #6

    I AM VERY SORRY!

    Quote Originally Posted by smozgur
    OtherMacro is in Module1 as sample. It basically takes selected date variable as parameter and executes a simple operation by clicking on the button after selecting a date in listbox.

    Suat
    (Removed previous attachment in my post since I uploaded the new one)
    In effective my wbook i have changed the position of the column (actually are in the sheet L0785_TOTALE column Z and AA, the recopy column is AB)

    I have run the macro but that give me an error?!

    Please if you have a little time set correctly the macro.

    new project:
    http://www.gssitaly.com/test_smozgur.zip

    [/QUOTE]
    Sal

  7. #7
    dont worry solved!
    Tks as usual...

    Another modify, please...

    make a button on the sheet associated to a mcaro with this condition:

    If the date in the column K and L are the same make to appear a msgbox "ALL OK!" and after skip to call MY MACRO(), if the date present in the column K and L are not the same like the old macro than start the form etc, etc...

    (naturally when you have a little time for me, for this hellp 2 Pizzas)

    I hope of to have been clear
    tks for the big patience...

  8. #8
    Please see my last post, you know my problem....

  9. #9
    BoardCoder VBAX Regular
    Joined
    May 2004
    Location
    Istanbul, Turkiye
    Posts
    73
    Is the attached one the latest copy that you are working on ? If not could you please attach the latest copy instead ?

    You mentioned K and L columns but I cannot see data in K and L columns in the last attached workbook.

    Suat

  10. #10
    Quote Originally Posted by smozgur
    Is the attached one the latest copy that you are working on ? If not could you please attach the latest copy instead ?

    You mentioned K and L columns but I cannot see data in K and L columns in the last attached workbook.

    Suat
    I am sorry i have modified last zip file with your correction, here is the new.
    as usual tks.

  11. #11
    BoardCoder VBAX Regular
    Joined
    May 2004
    Location
    Istanbul, Turkiye
    Posts
    73
    No problem.

    Attached is the modified TEST.xls.
    Please let me know if you have diffficulty to apply this into your original file.

    Suat

  12. #12

    NATURALLY IT WORK FINE!

    Quote Originally Posted by smozgur
    No problem.

    Attached is the modified TEST.xls.
    Please let me know if you have diffficulty to apply this into your original file.

    Suat
    This is a piece of code

    actually my problem is to devide the variable in txt format in 3 cells of this wbook if the variable assuming 22/09/2004:
    Note: i have formatted this column (N,O,P) in txt format

    cell N2 22 the day
    cell O2 09 the month
    cell P2 2004 the year

    to test this i have write the entire value of variable in N2 and i recieve 9/22/2004


    Private Sub CommandButton1_Click()
    Dim VAR_DATE As Date
        VAR_DATE = Me.ListBox1.Value
        Call AVVIO1(VAR_DATE)
        Exit Sub
    End Sub
    
    Sub AVVIO1(DatePar As Date)
        Range("N2") = DatePar 
    Call AVVIO
    End Sub
    I hope of to have been clear
    Sal
    1 help 1 pizza
    2 help 1 pizza 1 caff?
    3 help 1 pizza 1 caff? 1 mozzarella
    ...
    Spaghetti, Lasagne and Tortellini for the "Lady" ;-)

  13. #13
    Quote Originally Posted by smozgur
    No problem.

    Attached is the modified TEST.xls.
    Please let me know if you have diffficulty to apply this into your original file.

    Suat
    Solved the last problem to string the date...

    But one is BIG the form shown withe...

    Sorry for dimension file i attache my project here ...

    Test userform2, please

    Note: the sheet DB AGENZIE is hide
    http://www.gssitaly.com/l0785_def_test.zip


    ... also a dubt !!!

    But your macro not consider if the column L not contain any date?
    Sal
    1 help 1 pizza
    2 help 1 pizza 1 caff?
    3 help 1 pizza 1 caff? 1 mozzarella
    ...
    Spaghetti, Lasagne and Tortellini for the "Lady" ;-)

  14. #14
    Site Admin
    The Princess
    VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    Did you ever solve this, Sal?
    ~Anne Troy

  15. #15
    solved, tks.
    Sal
    1 help 1 pizza
    2 help 1 pizza 1 caff?
    3 help 1 pizza 1 caff? 1 mozzarella
    ...
    Spaghetti, Lasagne and Tortellini for the "Lady" ;-)

  16. #16
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    You can mark your threads solved here at VBAX, Sal. Go to the top of the page. Hit "Thread Tools" and then click "Mark Solved".



    I will do it for you!
    ~Anne Troy

Posting Permissions

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