09.03.2015 Views

documentation sur les programmes vba excel de traitement des profils

documentation sur les programmes vba excel de traitement des profils

documentation sur les programmes vba excel de traitement des profils

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Range("A7:B7").Select<br />

With Selection<br />

.HorizontalAlignment = xlCenter<br />

.VerticalAlignment = xlBottom<br />

.WrapText = False<br />

.Orientation = 0<br />

.AddIn<strong>de</strong>nt = False<br />

.In<strong>de</strong>ntLevel = 0<br />

.ShrinkToFit = False<br />

.ReadingOr<strong>de</strong>r = xlContext<br />

.MergeCells = False<br />

End With<br />

Selection.Merge<br />

Range("A7").Value = "Levé"<br />

Range("C7").Value = date3<br />

Cells(8, 1) = "N° PT"<br />

Cells(8, 2) = "Distance"<br />

Cells(8, 3) = "cote"<br />

Cells(8, 4) = "x"<br />

Cells(8, 5) = "y"<br />

Cells(8, 6) = "pk"<br />

date1 = date3<br />

nom = "p_" & date3 & "_" & pk & ".xls"<br />

nomfs = "p_" & date3 & "_s" & ".xls"<br />

Traitement profil travers txt<br />

chemin = "c:\Documents and<br />

Settings\FLEURY\Bureau\sig_camargue\data\data_christelle\a traiter\f_<strong>excel</strong>\"<br />

ActiveWorkbook.saveas Filename:=chemin & nom, _<br />

FileFormat:=xlNormal, Password:="", WriteResPassword:="", _<br />

ReadOnlyRecommen<strong>de</strong>d:=False, CreateBackup:=False<br />

'affectation <strong>de</strong> la valeur du pk à la colonne pk"<br />

Set Zone = Range("B9")<br />

Set d = Cells(65536, Zone.Column).End(xlUp)<br />

Set e = d.Offset(0, 4)<br />

Set Zone = Range(Range("F9"), e.Address)<br />

Zone.Value = pk<br />

'selection <strong>de</strong>s coordonnées du pk<br />

Windows("XY PK.xls").Activate<br />

Set Zone = Range("E2:E617").Find(pk)<br />

Range(Zone.Offset(0, -4), Zone.Offset(0, -1)).Copy<br />

'copie <strong>de</strong>s coordonnées du pk<br />

Windows(nom).Activate<br />

Ju<strong>les</strong> Fleury / CEREGE 31/05/2011 14

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!