• WSmikerickson

    WSmikerickson

    @wsmikerickson

    Viewing 3 replies - 46 through 48 (of 48 total)
    Author
    Replies
    • in reply to: Changing Range (2003) #1125375

      Rather than concatenating strings to get ranges, you could use the Cells property and the two property version of Range

      Dim lastRowNumber as Long
      Dim myRange as Range
      lastRowNumber = 40
      With Sheets("Data")
      Set myRange = Range(.Cells(2,1), .Cells(lastRowNumber,1))
      End With
      MsgBox myRange.Address: Rem A2:A40

      To get a discontinous range, you could use Application.Union

      'as above
      Set myRange = Application.Union(myRange, myRange.Offset(0,3))

      ActiveChart.SetSourceData Source:=myRange, PlotBy:=xlColumns

    • in reply to: Tab to control (2002 Sp3) #1125374

      I’m not sure where you are when you press Tab. If you are on a worksheet, you could use an OnKey event to have Tab trigger a sub to get you where you want to be. If you are in a useform, the KeyPress routine could be used (but changing the Tab order would be a more permenant solution)

    • in reply to: Help needed with an IF statement (2002) #1125373

      One way to do this would be to use =CHOOSE(WEEDAY(B7),3,1,monVal,tueVal,wedVal,thuVal,frVal)

    Viewing 3 replies - 46 through 48 (of 48 total)