Quobject Designer question import excel macro

22 views
Skip to first unread message

Matthias

unread,
Oct 13, 2011, 4:22:52 PM10/13/11
to Quobject
Sub Macro1()
'
' Macro1 Macro
'
'
Offset = 0
For Each cell In Selection
If Offset > 0 Then
Selection.Cells(0).Offset(1, Offset) = cell.Offset(0,
0).Value2
Selection.Cells(0).Offset(1, Offset + 1) =
cell.Offset(0, 1).Value2
Selection.Cells(0).Offset(1, Offset + 2) =
cell.Offset(0, 2).Value2
Selection.Cells(0).Offset(1, Offset + 3) =
cell.Offset(0, 3).Value2
cell.Offset(0, 0).ClearContents
cell.Offset(0, 1).ClearContents
cell.Offset(0, 2).ClearContents
cell.Offset(0, 3).ClearContents
End If
Offset = Offset + 4
Next cell
End Sub


=============================================
The above macro is helpful when creating import csv fles in MS Excel.
Reply all
Reply to author
Forward
0 new messages