Forum

Notifications
Clear all

description box

7 Posts
3 Users
0 Reactions
107 Views
(@melissa2910)
Posts: 4
Active Member
Topic starter
 

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.

 
Posted : 04/04/2017 8:18 pm
(@sunnykow)
Posts: 1417
Noble Member
 

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

 
Posted : 04/04/2017 9:15 pm
(@melissa2910)
Posts: 4
Active Member
Topic starter
 

thanks for your help

 
Posted : 04/04/2017 9:46 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

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

 
Posted : 04/04/2017 10:42 pm
(@melissa2910)
Posts: 4
Active Member
Topic starter
 

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

 
Posted : 05/04/2017 1:13 am
(@sunnykow)
Posts: 1417
Noble Member
 

Very likely your data table name is not MosaiqManager but something else.

Try renaming your data table to MosaiqManager

 
Posted : 05/04/2017 2:38 am
(@melissa2910)
Posts: 4
Active Member
Topic starter
 

thanks again for your help

 
Posted : 05/04/2017 6:26 pm
Share: