Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste and display issue
My code below does exactly what I need it to do. My only issue is that if
it is pasting the data way down on the sheet, the user has to scroll down to find if. Any way to have the newly pasted data display after it is pasted? Sub Paste_Data() Dim BCell, NBCell Dim PasteTo As Range Dim rng On Error GoTo Done Range("B5").Select Application.ScreenUpdating = False Application.EnableEvents = False For i = 1 To 65536 If ActiveCell.Value = Empty Then BCell = "B" & CStr(i - 1) NBCell = "B" & CStr(i - 2) GoTo Finished Else Range("B" & CStr(i + 1)).Select End If Next i Finished: Application.EnableEvents = True Set rng = Cells(ActiveCell.Row, 1) rng(1, 2).Select Selection.PasteSpecial Paste:=xlPasteValues Application.EnableEvents = True Done: End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Display Issue | Excel Discussion (Misc queries) | |||
Control button display issue | Excel Programming | |||
Display issue | Excel Worksheet Functions | |||
ActiveX Controls Display Issue? | Excel Discussion (Misc queries) | |||
Calendar Control - Display Issue | Excel Programming |