Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello, I'm sure this is a really simple one to ask but I'm a VBA newbie! I need my code to recognise which is the current active sheet but I don't know the correct syntax for it within an IF statement. Here is my draft coding: Private Sub CommandButton1_Click() If ActiveSheet = "Sheet 2" OR "Sheet 3" OR "Sheet 6" Then frmAddrecord1.Show Else frmAddrecord2.Show End If End Sub Also, as an alternative, please could you also help on the correct coding it would be via the Case select method. Thank you. -- Blondegirl ------------------------------------------------------------------------ Blondegirl's Profile: http://www.excelforum.com/member.php...o&userid=29615 View this thread: http://www.excelforum.com/showthread...hreadid=537687 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy sheet and make new sheet active | Excel Discussion (Misc queries) | |||
Active Cell Copy And Paste Sheet to Sheet | New Users to Excel | |||
Copy my active sheet to a new sheet and open with an input form | Excel Programming | |||
Copy from active sheet and paste into new sheet using info from cell in active | Excel Programming | |||
Recognising '0.00' | Excel Programming |