U
u473
I understand that to convert a numeric Cell import source
to a destination cell String, I need to transit the cell value to a
String Variable
then, load the String Variable to the destination cell.
My Import Source Column A, has a mix of Data Type 1 and 2.
I want the Destination Cells to be in Data Type 2 only (String),
But I am still struggling with the following code :
..
Sub Convert()
Dim LastRow As Integer: Dim i As Integer
Dim wbA As Workbook: Dim wbB As Workbook
Dim myPath As String: Dim Temp As String
myPath = "C:\"
Set wbA = Workbooks.Open(myPath & "A.xls")
ActiveWorkbook.Sheets(1).Select
LastRow = Range("A65335").End(xlUp).Row
Set wbB = Workbooks.Open(myPath & "B.xls")
i = 2
Do While i <= LastRow
wbA.Cells(i, 1).NumberFormat = "@"
' Error on above line : Object does not support this property or
method
Temp = wbA.Cells(i, 1)
wbB.Cells(i, 1).Value = Temp
i = i + 1
Loop
End Sub
..
Help appreciated,
J.P.
to a destination cell String, I need to transit the cell value to a
String Variable
then, load the String Variable to the destination cell.
My Import Source Column A, has a mix of Data Type 1 and 2.
I want the Destination Cells to be in Data Type 2 only (String),
But I am still struggling with the following code :
..
Sub Convert()
Dim LastRow As Integer: Dim i As Integer
Dim wbA As Workbook: Dim wbB As Workbook
Dim myPath As String: Dim Temp As String
myPath = "C:\"
Set wbA = Workbooks.Open(myPath & "A.xls")
ActiveWorkbook.Sheets(1).Select
LastRow = Range("A65335").End(xlUp).Row
Set wbB = Workbooks.Open(myPath & "B.xls")
i = 2
Do While i <= LastRow
wbA.Cells(i, 1).NumberFormat = "@"
' Error on above line : Object does not support this property or
method
Temp = wbA.Cells(i, 1)
wbB.Cells(i, 1).Value = Temp
i = i + 1
Loop
End Sub
..
Help appreciated,
J.P.