M
MarkC
This should be a simple question to answer. I just want clarification that my
macro is correct and this is the nest solution for me.
I developed a new system using many customised fields. However, many of my
users use the same data but in different customised fields. So what I want to
do is restructure/map their fields to mine. Would the following code work?
Sub FieldMapping()
Dim mytask As Task
For Each mytask In ActiveProject.Tasks
If Not (mytask Is Nothing) Then
mytask.Text1 = mytask.Text5
mytask.Text2 = mytask.Text3
mytask.Text3 = mytask.Text4
mytask.Text4 = mytask.Text12
mytask.Text5 = mytask.Text6
mytask.Finish1 = mytask.Date1
mytask.Number1 = mytask.Number4
End If
Next mytask
End Sub
If I want the value that's in Text1 to go Text6 but in the above example I
have Text5 going into Text1, then I will need to save Text1 data into a
temporary Text field at the start and later put it into Text6. I am fine with
this logic.
However, will I have problems if they use a number field and I use a text
field or viceversa?
Cheers,
Mark
macro is correct and this is the nest solution for me.
I developed a new system using many customised fields. However, many of my
users use the same data but in different customised fields. So what I want to
do is restructure/map their fields to mine. Would the following code work?
Sub FieldMapping()
Dim mytask As Task
For Each mytask In ActiveProject.Tasks
If Not (mytask Is Nothing) Then
mytask.Text1 = mytask.Text5
mytask.Text2 = mytask.Text3
mytask.Text3 = mytask.Text4
mytask.Text4 = mytask.Text12
mytask.Text5 = mytask.Text6
mytask.Finish1 = mytask.Date1
mytask.Number1 = mytask.Number4
End If
Next mytask
End Sub
If I want the value that's in Text1 to go Text6 but in the above example I
have Text5 going into Text1, then I will need to save Text1 data into a
temporary Text field at the start and later put it into Text6. I am fine with
this logic.
However, will I have problems if they use a number field and I use a text
field or viceversa?
Cheers,
Mark