Can someone please tell me how to write code so that in description box I can fill in the entire box (instead of it just being on one line).
Also once the sheet is entered-mine wont close-how do I get it to close after data is entered?
Thanks for your help.
Hi melissa
I assume you wanted a text box that can display more than one line. From the text box property, set Multiline to True
To close the Userform, you can add a command button and attach this code to it.
Private Sub CommandButton1_Click()
Unload Me
End Sub
Refer attachment for examples.
Hope this helps.
Sunny
thanks for your help
Hi Melissa,
Whilst we are happy to help, if you need an answer to something please only post on the forum OR leave a comment on the blog.
When you do both it can mean 2 people spend time answering the same question, which is what happened here.
Regards
Phil
Sorry Phil- I'm new to all these forums.
Why wont the text highlighted in bold work?
Private Sub Clear_Click()
ReportedBy = ""
IPAddress = ""
PatientUR = ""
Priority = ""
Classification = ""
Description = ""
ReportedTo = ""
End Sub
Private Sub CloseLog_Click()
Unload Me
End Sub
Private Sub EnterIssue_Click()
Dim LastRow As Range
Dim MosaiqManagementLog As ListObject
'Add row to bottom of MosaiqManagementLog
With Sheets("Mosaiq Management Log")
.ListObjects("MosaiqManager").ListRows.Add
'Enter data from form into our new row
Set MosaiqManagementLog = .ListObjects("MosaiqManager")
Set LastRow = MosaiqManagementLog.ListRows(MosaiqManagementLog.ListRows.Count).Range
With LastRow
.Cells(1, 1) = ReportedBy.Value
.Cells(1, 2) = IPAddress.Value
.Cells(1, 3) = PatientUR.Value
.Cells(1, 4) = Priority.Value
.Cells(1, 5) = Classification.Value
.Cells(1, 6) = Description.Value
.Cells(1, 7) = Date
.Cells(1, 8) = ReportedTo.Value
End With
End With
Unload Me
End Sub
Very likely your data table name is not MosaiqManager but something else.
Try renaming your data table to MosaiqManager
thanks again for your help