Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm not a profesional programmer but I know enough to mess stuff up! I have
a form that will be filled out and there is a submit button on the bottom. On submit the information is passed to a CSV file. This is my first time trying to pass info to a CSV. When ever I submit the form, the cell a1 on ends up being 255 # signs. I'll attach my code, I'm hoping someone can shed some light on thi for me. ------------------------------------------------------------------------------------------ Private Sub CommandButton2_Click() 'Submits information entered into form to master escalation list Application.ScreenUpdating = True Dim workingdir As String Dim Workingfilename As String Dim workinglocation As String Dim escnum As String Dim cnt As String Dim RngMax As Variant workingdir = "\\rci.rogers.ca\dfsdata\rss\bu 03\resp 7077\dept 200\Leadership Team\Cable Specific\Mark's Templates & Reports\Escalation Project\" Workingfilename = "master.csv" workinglocation = workingdir & Workingfilename If IsFileOpen(workinglocation) = True Then MsgBox ("The file is in use, wait a moment and try again.") Exit Sub Else 'On Error Resume Next Workbooks.Open (workinglocation) 'Application.Wait (Now() + TimeValue("0:00:05")) a = 2 cnt = 1 If Cells(1, 1) < "" Then Do While ActiveSheet.Cells(a, 1) < "" a = a + 1 cnt = cnt + 1 Loop End If RngMax = WorksheetFunction.Max(Range(Cells(1, 1), Cells(cnt, 1))) escnum = 20080000 + cnt If escnum < RngMax Then escnum = RngMax + 1 End If Cells(a, 1) = escnum Cells(a, 2) = Now() Selection.NumberFormat = "d-mmm-yy h:mm;@" Cells(a, 3) = CxName Cells(a, 4) = AcctNum Cells(a, 5) = PriNum Cells(a, 6) = AltNum Cells(a, 7) = CBTime Cells(a, 8) = Dept Cells(a, 9) = askfs Cells(a, 10) = FSName Cells(a, 11) = EscDets Cells(a, 12) = "Pending" 'escmemo = Cells(a, 1) Workbooks("master.csv").Close (True) Escalation_Form.Hide MsgBox ("Your Escalation has been sent " & "Escalation number: " & escnum) End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
.TMP files are corrupting my folders | Excel Discussion (Misc queries) | |||
Combo box corrupting VLookup function | Excel Discussion (Misc queries) | |||
Formatting corrupting the workbook | Excel Programming | |||
VB Corrupting Pivot Tables | Excel Discussion (Misc queries) | |||
Corrupting a Cell | Excel Programming |