Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can someone provide me assistance with this case statement. I have attached
it to a command button and it does nothing. The object is to copy information from another sheet in the workbook based on the value of a certain cell. Sub GetGrades_Sh1() Dim sGrade1 As String sGrade1 = "Shift1!P101" Select Case sGrade1 Case Is = "WF" Sheets("Data").Range("B6:B17").Select Selection.Copy Sheets("Shift1").Range("A7").Select Selection.Paste Application.CutCopyMode = False Case Is = "PP" Sheets("Data").Range("C6:C22").Select Selection.Copy Sheets("Shift1").Range("A7").Select Selection.Paste Application.CutCopyMode = False Case Is = "SP" Sheets("Data").Range("D6:D16").Select Selection.Copy Sheets("Shift1").Range("A7").Select Selection.Paste Application.CutCopyMode = False End Select End Sub -- ----- Thank you, Liz |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Case Statement | Excel Discussion (Misc queries) | |||
Case Of Statement | Excel Programming | |||
select case statement | Excel Programming | |||
Case Statement Help | Excel Programming | |||
Case statement | Excel Programming |