Tecnologia, programação e muito Visual FoxPro.

terça-feira, 8 de março de 2011

Re: ]] XL-mania [[ Paste Link MS Project dan Excel

 

hai ajie

bisa pakai macro ini
buka file ms projectnya, buka file ini, jalankan macronya


---
Option Explicit
Dim xlRow As Excel.Range
Dim xlCol As Excel.Range
Sub TaskHierarchy()
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Dim Proj As Project
Dim t As Task
Dim Asgn As Assignment
Dim ColumnCount As Integer
Dim Columns As Integer
Dim Tcount As Integer

Set xlApp = New Excel.Application
xlApp.Visible = True
AppActivate "Microsoft Excel"

Set xlBook = xlApp.Workbooks.Add
Set xlSheet = xlBook.Worksheets.Add
xlSheet.Name = ActiveProject.Name

ColumnCount = 0
For Each t In ActiveProject.Tasks
    If Not t Is Nothing Then
        If t.OutlineLevel > ColumnCount Then
            ColumnCount = t.OutlineLevel
        End If
    End If
Next t

Set xlRow = xlApp.ActiveCell
xlRow = "Filename: " & ActiveProject.Name
dwn 1
xlRow = "OutlineLevel"
dwn 1

For Columns = 1 To (ColumnCount + 1)
    Set xlCol = xlRow.Offset(0, Columns - 1)
    xlCol = Columns - 1
Next Columns

Tcount = 0
For Each t In ActiveProject.Tasks
    If Not t Is Nothing Then
        dwn 1
        Set xlCol = xlRow.Offset(0, t.OutlineLevel)
        xlCol = t.Name
            If t.Summary Then
                xlCol.Font.Bold = True
            End If
        For Each Asgn In t.Assignments
            Set xlCol = xlRow.Offset(0, Columns)
            xlCol = Asgn.Start
            rgt 1
            xlCol = Asgn.Finish
            rgt 1
            xlCol = Asgn.ResourceName
            rgt 1
        Next Asgn
        Tcount = Tcount + 1
    End If
Next t
AppActivate "Microsoft Project"

MsgBox ("Macro Complete with " & Tcount & " Tasks Written")
End Sub
Sub dwn(i As Integer)
Set xlRow = xlRow.Offset(i, 0)
End Sub

Sub rgt(i As Integer)
Set xlCol = xlCol.Offset(0, i)
End Sub

--
thank you and regards,

- abimono -




2011/3/9 cancergraph <cancergraph@yahoo.co.id>
 

Dear para master excel,

mau tanya niy, Gimana cara buat paste link dari data MS-project ke Excel. Jadi setiap ada perubahan data di MS project bisa langsung link juga ke excel. Saya sudah coba mengikuti fasilitas helpnya yaitu dengan perintah

@ms project;copy
@ms Excel;paste special>>paste link>>text>>ok

memang awalnya bisa, tapi setelah kedua file tersebut ditutup, kemudian dibuka kembali link-nya sudah terputus, jadi terpaksa saya mesti ulang copy lagi setiap mengedit data. Jika memang mesti menggunakan macro kira2 bagaimana caranya, karena saya sendiri awam dengan fasilitas macro.

Thanks
Adjie

__._,_.___
Recent Activity:
+-:: XL-mania ::::::::::::::::::::----------------------------------+
| sorry... moderasi super lemot... momods lagi sakit parah...       |
| buku terbaru XL mania: insipartif dan unik, gabungan antara buku  |
| aplikasi bisnis dan buku komputer. isinya tidak biasa!            |
| http://www.xl-mania.com/2011/02/mengapa-boss-benci-chart-anda.html|
| http://www.facebook.com/group.php?gid=37671048001&ref=mf          |
+-------------------------------------------------------------------+
| DILARANG : MLM, money game, OOT, iklan tanpa izin, SARA, testing, |
| pembicaraan pribadi, one line message,  melecehkan,  tidak sopan. |
+-------------------------------------------------------------------+
| Buat subjek yang kreatif, jangan : "tanya", "help", "mohon bantu" |
| Usahakan besar attachment < 200 kb. Gunakan  winzip  jika  perlu. |
+-------------------------------------------------------------------+
| Ajak teman-teman Anda bergabung dengan mengirim e-mail kosong ke  |
| XL-mania-subscribe@yahoogroups.com atau kirimkan mereka file dari |
| http://groups.yahoo.com/group/XL-mania/files/Promotion/           |
+-------------------------------------------------------------------+
| Berikan testimoni di : http://www.friendster.com/xlmania atau...  |
| http://www.xl-mania.com/2008/06/testimoni-xl-mania.html           |
+-------------------------------------------------------------------+
| Message lama ada di :                                             |
| http://groups.yahoo.com/group/XL-mania/messages [perlu yahoo id]  |
| http://www.mail-archive.com/xl-mania@yahoogroups.com              |
+-------------------------------------------------------------------+
.

__,_._,___

Nenhum comentário:

Arquivo do blog