| View previous topic :: View next topic |
| Author |
Message |
bhq76 Newbie

Joined: 09 Jun 2010 Posts: 4
|
Posted: Wed Jun 16, 2010 8:32 pm Post subject: Help me...convert excell VBA to OOo macro..... |
|
|
please help me....
I still new learn about OOo macro, my macro in excell file dont work with calc..macro
please help me, how to convert this.....
{}
Sub ok()
Dim wo, msn, job, op, qti, tmi, ot, spe, dime As String
Dim tgln As Date
Sheets("lapro").Select
Range("a5").Select
Set Sheet = Sheets("menu1")
tgln = Sheet.Range("c4").Value
wo = Sheet.Range("c5").Value
msn = Sheet.Range("c6").Value
op = Sheet.Range("c7").Value
job = Sheet.Range("c8").Value
spe = Sheet.Range("c9").Value
dime = Sheet.Range("c10").Value
qti = Sheet.Range("c11").Value
tmi = Sheet.Range("c12").Value
ot = Sheet.Range("c13").Value
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Formula = Day(tgln)
ActiveCell.Offset(0, 1).Formula = Month(tgln)
ActiveCell.Offset(0, 2).Formula = Year(tgln)
ActiveCell.Offset(0, 3).Value = wo
ActiveCell.Offset(0, 4).FormulaR1C1 = "=VLOOKUP(RC[-1],wo!R5C2:R500C8,4,)"
ActiveCell.Offset(0, 5).FormulaR1C1 = "=VLOOKUP(RC[-2],wo!R5C2:R500C8,6,)"
ActiveCell.Offset(0, 6).FormulaR1C1 = "=VLOOKUP(RC[-3],wo!R5C2:R500C8,5,)"
ActiveCell.Offset(0, 7).Value = msn
ActiveCell.Offset(0, .Value = op
ActiveCell.Offset(0, 9).Value = job
ActiveCell.Offset(0, 10).Value = spe
ActiveCell.Offset(0, 11).Value = dime
ActiveCell.Offset(0, 12).Value = qti
ActiveCell.Offset(0, 13).Value = tmi
ActiveCell.Offset(0, 14).Value = ot
End Sub
{}
thank's |
|
| Back to top |
|
 |
aloarjr810 OOo Enthusiast


Joined: 04 Jun 2008 Posts: 113
|
Posted: Sat Jun 26, 2010 7:42 am Post subject: |
|
|
Try adding this at the beginning of your macro. This will let some excel macros work.
| Code: |
Option VBASupport 1 'add this
Sub ok()
Dim wo, msn, job, op, qti, tmi, ot, spe, dime As String
Dim tgln As Date
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|