gakiss2
Registered User.
- Local time
- Today, 10:10
- Joined
- Nov 21, 2018
- Messages
- 168
Overall function is OK. the excel file is created and the data placed into the cells as desired (mostly) then the modified file is saved as a new file.
The issue is one of the fields is not outputting correctly. Attached I have screen shot of the database showing the field as "Machine No. N3-790Defect: The air bag has a broken seal." When the record comes up in a form it looks the same, I attached a screenshot called Form. When I out put it to Excel it gets cut off and only says "Machine No. N3-790". I attached the screenshot of the excel file. Another screen shot is the code and also here:
Public Function DoExcel()
Dim oXL As Object
Dim NewFile As String
Set oXL = CreateObject("Excel.Application")
oXL.Visible = True
Set wb = oXL.Workbooks.Open("C:\Users\gkissick\Desktop\PRR.xlsx", True, False)
wb.Sheets(1).Range("F2").Value = "YES"
wb.Sheets(1).Range("c4").Value = Forms!frmMRRLog!SupplierName
wb.Sheets(1).Range("h4").Value = Date
wb.Sheets(1).Range("c6").Value = Forms!frmMRRLog!item
wb.Sheets(1).Range("b17").Value = Forms!frmMRRLog!ProblemDescription
wb.Sheets(1).Range("e6").Value = Forms!frmMRRLog!mrr_num
NewFile = "C:\Users\gkissick\Desktop\PRR " & Forms!frmMRRLog!mrr_num
wb.SaveAs FileName:=NewFile, FileFormat:=56
End Function
I can also tell you that the data is imported from an Excel File and in that Excel file the entire text shows in the cell BUT there is some sort of internal line break because it shows up in the cell as:
Machine No. N3-790
Defect: The air bag has a broken seal.
Which is, of course, right where the record gets cut when put into the Excel.
I just don't know what to do to get the entire field to get put into the Excel cell. Some sort of hidden text codes in the text? Some way to strip them out?? More background is that the data originally comes from a commercial database type program 'Siteline' or 'Infor' and I'm sure other aliases as well. I don't have any influence over that, just thought it might help understand why the text is getting cut.
Help is greatly appreciated.
The issue is one of the fields is not outputting correctly. Attached I have screen shot of the database showing the field as "Machine No. N3-790Defect: The air bag has a broken seal." When the record comes up in a form it looks the same, I attached a screenshot called Form. When I out put it to Excel it gets cut off and only says "Machine No. N3-790". I attached the screenshot of the excel file. Another screen shot is the code and also here:
Public Function DoExcel()
Dim oXL As Object
Dim NewFile As String
Set oXL = CreateObject("Excel.Application")
oXL.Visible = True
Set wb = oXL.Workbooks.Open("C:\Users\gkissick\Desktop\PRR.xlsx", True, False)
wb.Sheets(1).Range("F2").Value = "YES"
wb.Sheets(1).Range("c4").Value = Forms!frmMRRLog!SupplierName
wb.Sheets(1).Range("h4").Value = Date
wb.Sheets(1).Range("c6").Value = Forms!frmMRRLog!item
wb.Sheets(1).Range("b17").Value = Forms!frmMRRLog!ProblemDescription
wb.Sheets(1).Range("e6").Value = Forms!frmMRRLog!mrr_num
NewFile = "C:\Users\gkissick\Desktop\PRR " & Forms!frmMRRLog!mrr_num
wb.SaveAs FileName:=NewFile, FileFormat:=56
End Function
I can also tell you that the data is imported from an Excel File and in that Excel file the entire text shows in the cell BUT there is some sort of internal line break because it shows up in the cell as:
Machine No. N3-790
Defect: The air bag has a broken seal.
Which is, of course, right where the record gets cut when put into the Excel.
I just don't know what to do to get the entire field to get put into the Excel cell. Some sort of hidden text codes in the text? Some way to strip them out?? More background is that the data originally comes from a commercial database type program 'Siteline' or 'Infor' and I'm sure other aliases as well. I don't have any influence over that, just thought it might help understand why the text is getting cut.
Help is greatly appreciated.