Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You have to have some line in your code that looks like a label:
Dim ws As Worksheet Set ws = Worksheets("data2") If WorksheetFunction.Count(ws.Cells) = 0 Then GoTo labelNameHere 'do some stuff labelnamehe 'do different stuff ====== But I think most would say that using labels may not be the best way to approach it. Can't you just write your if statement something like: Dim ws As Worksheet Set ws = Worksheets("data2") If WorksheetFunction.Count(ws.Cells) = 0 Then 'do nothing else 'do some stuff end if 'do different stuff answer33 wrote: It may sound basics, put I need help to define a label... I try the following codes and it alwas get an error of label not define. Dim ws As Worksheet Set ws = Worksheets("data2") If WorksheetFunction.Count(ws.Cells) = 0 Then GoTo labelNameHere -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing the font for part of an axis label, not the whole label. | Charts and Charting in Excel | |||
How to rezize data label box in pie charts (label wraps to two lin | Charts and Charting in Excel | |||
How to take the worksheet name as a variable(Label/Define) in a fo | Excel Worksheet Functions | |||
Using Name Label to try to define linked cell | Links and Linking in Excel | |||
add text to label (label from forms toolbar) | Excel Programming |