View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default value of variables do not show when I hover.

I never step through my code or set watch variables, so I am afraid I can't
be of much help there.

If you want to paste to the first blank cell after cell W1 in the sheet with
the name in the activeCell.

Dim rng as Range, rng1 as Range
on Error Resume Next
set rng = Worksheets(ActiveCell.Value).Range("W1")
On Error goto 0
if rng is nothing then
msgbox "No sheet named " & activeCell.Value
Exit sub
End if
if isempty(rng) then
set rng1 = rng
elseif isempty(rng.offset(1,0)) then
set rng1 = rng.offset(1,0)
else
set rng1 = rng.End(xldown).Offset(1,0)
End if
rng1.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False


--
Regards,
Tom Ogilvy


JSnader wrote in message
ink.net...
When I step through my code using F8, "tooltip." do not show the value of

my
variables when I hover over them.
I think the value of SalesFlock and ws.Name should show when I've stepped
past them, and then hover.

The following code should find the correct sheet and add the information

to
the bottom of the list.

SalesFlock = ActiveCell.Text

Dim ws As Worksheet
For Each ws In Worksheets
If ws.Name = SalesFlock Then
ws.Select
Range("w1").Select

Do While ActiveCell.Value < ""
ActiveCell.Offset(1, 0).Select
Loop

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks

_
:=False, Transpose:=False

Exit For
End If
Next ws