VBA to copy sheets (as values) that begin with the same sheet name
Assuming Sheet1 has the ComboBox:
Sub Test()
Dim ws As Worksheet, fFound As Boolean
fFound = True
For Each ws In Worksheets
If Left(ws.Name, Len(Sheet1.ComboBox1)) = Sheet1.ComboBox1 Then
ws.Select fFound
fFound = False
End If
Next
ActiveWindow.SelectedSheets.Copy
End Sub
Not sure what you mean by wanting a macro to call a combo box.
--
Vasant
"Brent Walker" wrote in message
...
Experienced in Excel, but I am just learning VBA.
I want the macro to call a combo box and then select all sheets that start
with the value in the combo. Then, it needs to copy the selected sheets
(as
values) to a new workbook.
--
Thanks,
Brent
|