PDA

View Full Version : [SOLVED:] Problem with split



elmnas
06-02-2015, 06:45 AM
Hello guys I have made following code below:


I have made an alert for the sheetname with wildcards

now I try to split the name into pieces, but I don't get it work why?



Sub Companyname()
'For i = 2 To ActiveSheet.UsedRange.SpecialCells(xlCellTypeLastCell).Row
Dim mySheetname As String
Dim splitTarget As String
For Each sht In ThisWorkbook.Worksheets
mySheetname = sht.Name
If sht.Name Like "kalle kalle*" Then
splitTarget = Split(mySheetname, "_")
MsgBox splitTarget
End If
Next sht
'Next i
End Sub


Thank you in advance

elmnas
06-02-2015, 07:06 AM
already solved I did an array :)

SamT
06-02-2015, 01:56 PM
You can use "Thred Tools" at the top of the thread to mark your threads "Solved". I did it for you this time.