Hi,
I'm having a real hard time with this, I have a spreadsheet set up to IMPORT at the click of a button. The sheet is updated daily via a Macro, the macro also formats the data to text. I thought that would fix my problem, but it doesn't seem to matter.
Whenever a cell in Excel alphanumeric, the cell is blank following the import. What do I have to do to get it to accept? What makes it more frustrating is that sometimes it works and sometimes it doesn't.
So I don't know if the position of the alpha causes it to be rejected, most of the data is numeric.
Sample
These are the last few records sorted Ascending, all the cells preceded by a Alpha do not import, if I change the sort to Descending they will import but it is possible for me to have some that end with a Alpha, I don't know how they will respond?
830635
830777
903306
6841101
681951
780376
C37761
C37773
C37792
C37803
C37805
C37814
C37841
C37896
C37903
MY Excel Code for sorting and saving from disk as I am copying from one network to another. Some is done with the recorder, I modified the rest for the variable file name
Sub RecLogSave()
Dim datenow As String
Dim savename As String
'
datenow = Format(Now(), "m-d-yyyy")
savename = "reclog" & (datenow) & ".xls"
ChDir "A:\"
Workbooks.Open Filename:="A:\RECLOG.xls"
ChDir "\\MyDoc\fw6\3PR&3SRTrailers"
Columns("A:F").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
'what does this line do?
Selection.NumberFormat = "@"
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"\\MyDoc\fw6\3PR&3SRTrailers\reclog.xls", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWorkbook.SaveAs Filename:= _
"\\MyDoc\fw6\3PR&3SRTrailers\" & savename, FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWorkbook.Close
Application.DisplayAlerts = True
End Sub
Thanks
Ziggy
I'm having a real hard time with this, I have a spreadsheet set up to IMPORT at the click of a button. The sheet is updated daily via a Macro, the macro also formats the data to text. I thought that would fix my problem, but it doesn't seem to matter.
Whenever a cell in Excel alphanumeric, the cell is blank following the import. What do I have to do to get it to accept? What makes it more frustrating is that sometimes it works and sometimes it doesn't.
So I don't know if the position of the alpha causes it to be rejected, most of the data is numeric.
Sample
These are the last few records sorted Ascending, all the cells preceded by a Alpha do not import, if I change the sort to Descending they will import but it is possible for me to have some that end with a Alpha, I don't know how they will respond?
830635
830777
903306
6841101
681951
780376
C37761
C37773
C37792
C37803
C37805
C37814
C37841
C37896
C37903
MY Excel Code for sorting and saving from disk as I am copying from one network to another. Some is done with the recorder, I modified the rest for the variable file name
Sub RecLogSave()
Dim datenow As String
Dim savename As String
'
datenow = Format(Now(), "m-d-yyyy")
savename = "reclog" & (datenow) & ".xls"
ChDir "A:\"
Workbooks.Open Filename:="A:\RECLOG.xls"
ChDir "\\MyDoc\fw6\3PR&3SRTrailers"
Columns("A:F").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
'what does this line do?
Selection.NumberFormat = "@"
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"\\MyDoc\fw6\3PR&3SRTrailers\reclog.xls", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWorkbook.SaveAs Filename:= _
"\\MyDoc\fw6\3PR&3SRTrailers\" & savename, FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWorkbook.Close
Application.DisplayAlerts = True
End Sub
Thanks
Ziggy