silentwolf
Well-known Member
- Joined
- May 14, 2008
- Messages
- 1,216
- Office Version
- 2016
Hi guys,
as I am importing an Excel Worksheet into my access database I need some assistance to convert a column in Excel to a longInteger Field in Access.
This is what I tried.
In Excel the column(17) is blank and I fill it with the number 59. This is a dummy so to say .. As I need this column to be a field with longInteger datatype in Access I did try to convert it to Long in my code.
When I import that worksheet in access I get doule Datatyp tough. So I was wondering if someone knows how to be able to get around this.
Many thanks
Albert
as I am importing an Excel Worksheet into my access database I need some assistance to convert a column in Excel to a longInteger Field in Access.
Code:
Sub FillAllCellsWithLongInteger()
Dim Zeile As Integer
Dim ZeileMax As Long
Application.ScreenUpdating = False
With ActiveSheet
ZeileMax = .Cells(Rows.Count, 1).End(xlUp).Row
For Zeile = 2 To ZeileMax
.Cells(Zeile, 17).Value = CLng(59)
Next
End With
Application.ScreenUpdating = True
End Sub
This is what I tried.
In Excel the column(17) is blank and I fill it with the number 59. This is a dummy so to say .. As I need this column to be a field with longInteger datatype in Access I did try to convert it to Long in my code.
When I import that worksheet in access I get doule Datatyp tough. So I was wondering if someone knows how to be able to get around this.
Many thanks
Albert