Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.
Private Sub cmdProcess_Click() Dim wkb As String, i As Integer, response As Integer, msg As String, title As String, style As String, _ intcounter As Integer, oCtrl As Control, k As String 'check for list box selection If Me.lstTrans = vbNullString Then 'if nothing was selected, tell user and let them try again ->> Exit Sub Else 'only controls For Each oCtrl In frm_ledger_coding.fra1.Controls 'only option buttons If TypeName(oCtrl) = "OptionButton" Then 'which one is checked? If oCtrl.Value = True Then 'what's the tag? k = oCtrl.Tag Exit For End If End If Next 'specifying cunter to start from row 2 intcounter = 2 If k = "" Then Exit Sub Else 'specifying list selection counts For i = 0 To lstTrans.ListCount - 1 If lstTrans.Selected(i) Then With ActiveWorkbook.Worksheets("Import") 'Range H being the amount which always have a value While .Range("H" & intcounter).Value <> "" 'compare the key in column c with the list value in column 0 (bound column) If .Range("C" & intcounter).Value = lstTrans.List(i) Then Range("I" & intcounter).Value = k End If intcounter = intcounter + 1 Wend End With End If Next i End If End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Recolor all specifically named pie charts using VBA||4||35|
|VBA Kill file but send it to recycle bin, Not permanently delete it.||26||36|
|Excel graph in access report||1||27|
|sort time order||10||39|
Join the community of 500,000 technology professionals and ask your questions.