Hi Kumlakar,
What you have is an Excel VB macro. OOo uses a similar
version of basic, but the interface to the spreadsheet is
completely different. If you search the OOo web site for
'macro', you'll find some help on translating or re-writing
your macros.
tc
Bumper India Pvt. Ltd. wrote:
To,
i have following macro for spreadsheet.
which shows following syntax error
BASIC Syntax error unknown data type worksheet
please help me !
THE CODE .....
code:
---------------------------------------------------------------------------
---
Public Sub SummarizePoints() Dim TargSh As Worksheet Dim Pt, SrcSh Dim TargCol As Integer
'DEFINE TARGET/OUTPUT SHEET Set TargSh = Worksheets("Sheet3")
'LOOP THRU ALL SOURCE SHEETS For Each SrcSh In Array("Sheet1", "Sheet2")
'LOOP THRU EACH ROW, THAT HAS NUMBERS IN COL B OF SOURCE For Each Pt In Sheets(SrcSh).Columns("B:B").SpecialCells(xlCellTypeConstants, 1) 'FIND THE CORRECT TARGET COLUMN BY FINDING PT HEADER TargCol = PointColumn(TargSh.Name, Pt) 'FIND THE FIRST EMPTY ROW IN TARGET COLUMN NxRow = TargSh.Cells(65536, TargCol).End(xlUp).Row + 1 'PLACE NAME IN TARGET COLUMN !!!!!!!! TargSh.Cells(NxRow, TargCol).Value = Pt.Offset(0, -1).Value Next Pt ' loop points Next SrcSh ' loop sheets
End Sub
Public Function PointColumn(ShName, PtNum) As Integer With Worksheets(ShName).Rows("1:1") Set c = .Find(PtNum, LookIn:=xlValues, lookat:=xlWhole) If Not c Is Nothing Then ' if pt column found PointColumn = c.Column Else ' if pt column NOT found PointColumn = Sheets(ShName).Cells(1, 256).End(xlToLeft).Column + 1 End If End With End Function
---------------------------------------------------------------------------
---
thanks from kamlakar
----------------------------------------------------------------------
--- Scan Report ---------------------------------------------------
Scanning Options Used :
-----------------------
Scan inside .ZIP and .ARJ files.
Disinfect whenever possible.
Scan compressed executables.
Scan of all type of files.
Remove infected Contents in attachments (Neutralize).
Detect standard Zip files irrespective of file extension.
Clean inside standard Zip files.
From: "Bumper India Pvt. Ltd." <[EMAIL PROTECTED]>
Subject: help on macro correction
01. Name: noname (Type: text/plain)
>> * No virus found * <<
02. Name: noname (Type: text/html)
>> * No virus found * <<
CxProtect Cleaned 0 infections and Neutralized : 0
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]