ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   delayed worksheet.activate (https://www.excelbanter.com/excel-programming/281325-delayed-worksheet-activate.html)

Rune_Daub[_5_]

delayed worksheet.activate
 

I have 3 worksheets.
From worksheet 1, I copy some information.
I paste the data in worksheet 2.
and do some calculations in worksheet 3.

This is just the basics of the worksheet. Its alot more comprehensive
than this, so I dont want to put the whole lot of code into worksheet
1. I need to split it up into the 3 worksheets.

How do I delay the jumping from worksheet 2 to 3 for about 1 second.

I have the copy in WS 1. There is also the Paste in WS2 in here.
I have a activate function in WS2 that sends me to WS3.

My problem is that it doesnt have the time to paste the results of the
WS1 paste into WS2 before it goes onto WS3.

So I need the jump from WS2 to WS3 to be delayed for 1 second. How??


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/


Paul B[_6_]

delayed worksheet.activate
 
Rune, you don't have to go to the sheets to copy and paste, try something
like this

Sub test()
'copys sheet1 range A1:A200 to sheet2 range B1:B200
Sheet2.Range("B1:B200").Value = Sheet1.Range("A1:A200").Value

'if you want to go to sheet 3
Sheets("Sheet3").Select
End Sub


--
Paul B
Always backup your data before trying something new
Using Excel 2000 & 97
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
"Rune_Daub" wrote in message
...

I have 3 worksheets.
From worksheet 1, I copy some information.
I paste the data in worksheet 2.
and do some calculations in worksheet 3.

This is just the basics of the worksheet. Its alot more comprehensive
than this, so I dont want to put the whole lot of code into worksheet
1. I need to split it up into the 3 worksheets.

How do I delay the jumping from worksheet 2 to 3 for about 1 second.

I have the copy in WS 1. There is also the Paste in WS2 in here.
I have a activate function in WS2 that sends me to WS3.

My problem is that it doesnt have the time to paste the results of the
WS1 paste into WS2 before it goes onto WS3.

So I need the jump from WS2 to WS3 to be delayed for 1 second. How??


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/




Rune_Daub[_6_]

delayed worksheet.activate
 

I know that solution.. I used it before, but the problem is that I have
an interactive range in Sheet 1 that changes due to some restrictions.
If I just set the value range to for example
Sheet2.Range("B1:B200").Value it will copy the entire rows, but If I do
the copy function I can make it copy only exactly what the interactive
range says.

In sheet 1 I have to copy a filtered list. The only way I can do this,
is by a copy function. As far as I know anyways.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/


Paul B[_7_]

delayed worksheet.activate
 
Rune, then how about something like this, will copy only the visible cells
in the filtered list

Sheet1.Range("A1:A200").SpecialCells(xlCellTypeVis ible).Copy _
Destination:=Sheet2.Range("B1")

"Rune_Daub" wrote in message
...

I know that solution.. I used it before, but the problem is that I have
an interactive range in Sheet 1 that changes due to some restrictions.
If I just set the value range to for example
Sheet2.Range("B1:B200").Value it will copy the entire rows, but If I do
the copy function I can make it copy only exactly what the interactive
range says.

In sheet 1 I have to copy a filtered list. The only way I can do this,
is by a copy function. As far as I know anyways.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/




Paul B[_7_]

delayed worksheet.activate
 
Rune, but if you still need to delay it try this

Application.Wait Now + TimeValue("00:00:01")

--
Paul B
Always backup your data before trying something new
Using Excel 97 & 2000
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **

"Paul B" wrote in message
...
Rune, then how about something like this, will copy only the visible cells
in the filtered list

Sheet1.Range("A1:A200").SpecialCells(xlCellTypeVis ible).Copy _
Destination:=Sheet2.Range("B1")

"Rune_Daub" wrote in message
...

I know that solution.. I used it before, but the problem is that I have
an interactive range in Sheet 1 that changes due to some restrictions.
If I just set the value range to for example
Sheet2.Range("B1:B200").Value it will copy the entire rows, but If I do
the copy function I can make it copy only exactly what the interactive
range says.

In sheet 1 I have to copy a filtered list. The only way I can do this,
is by a copy function. As far as I know anyways.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/







All times are GMT +1. The time now is 04:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com