PDA

View Full Version : [SOLVED:] Recopy Without Duplicate And Insert In Form



sal21
09-20-2004, 06:39 AM
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...

smozgur
09-21-2004, 05:43 AM
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

sal21
09-21-2004, 07:18 AM
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...

smozgur
09-21-2004, 07:32 AM
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)

sal21
09-21-2004, 07:35 AM
woh!!!!!!!!!!!!!!!!!!!!!!!

sal21
09-22-2004, 01:36 AM
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

sal21
09-22-2004, 05:12 AM
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...

sal21
09-23-2004, 01:38 AM
Please see my last post, you know my problem....

smozgur
09-23-2004, 02:22 AM
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

sal21
09-23-2004, 03:04 AM
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.

smozgur
09-23-2004, 04:54 AM
No problem.

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

Suat

sal21
09-23-2004, 06:38 AM
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

sal21
09-23-2004, 07:45 AM
No problem.

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

SuatSolved 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?

Anne Troy
09-28-2004, 10:25 PM
Did you ever solve this, Sal? :)

sal21
09-29-2004, 12:22 AM
solved, tks.

Anne Troy
09-29-2004, 12:24 AM
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".

:D

I will do it for you!