Simple problem

Khazimula

New Member
Joined
Jul 15, 2005
Messages
30
Hi all,

I know this is probably really simple, but its got me pretty stumped. I'm trying to use VB to look through a workbook and select all sheets starting with HA, one at a time. I know in excel, HA* can be used. Does anyone know whether there is something similar in VB?
 

Some videos you may like

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,057
Office Version
  1. 365
Platform
  1. Windows
Can you post what code you have?
Code:
Dim ws As Worksheet

For Each ws In ActiveWorkbook.Worksheets

    If Left(ws.Name)="HA" Then
       Msgbox ws.Name
    End If

Next ws
By the way you've posted in the Access forum.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,455
Messages
5,572,216
Members
412,448
Latest member
ManuW
Top