Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Wait less than a second

Hi

I would like to delay the hiding of 4 columns, someting like

Columns("R").Hidden = True
Application.Wait (Now + TimeValue("0:00:01"))
Columns("S").Hidden = True
Application.Wait (Now + TimeValue("0:00:01"))
Columns("T").Hidden = True
Application.Wait (Now + TimeValue("0:00:01"))
Columns("U:").Hidden = True

How do i define a time less than a second ?

Hoping for an answer


Regards,
Claus


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Wait less than a second

Put this at the very top of your code module:

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Then where you want to wait put something like this:

Wait 500 'wait 0.5 seconds


RBS


"Claus" wrote in message
...
Hi

I would like to delay the hiding of 4 columns, someting like

Columns("R").Hidden = True
Application.Wait (Now + TimeValue("0:00:01"))
Columns("S").Hidden = True
Application.Wait (Now + TimeValue("0:00:01"))
Columns("T").Hidden = True
Application.Wait (Now + TimeValue("0:00:01"))
Columns("U:").Hidden = True

How do i define a time less than a second ?

Hoping for an answer


Regards,
Claus


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Wait less than a second

Thank you

It works when i replace "Wait" with "Sleep"

Regards,
Claus
"RB Smissaert" skrev i en meddelelse
...
Put this at the very top of your code module:

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Then where you want to wait put something like this:

Wait 500 'wait 0.5 seconds


RBS


"Claus" wrote in message
...
Hi

I would like to delay the hiding of 4 columns, someting like

Columns("R").Hidden = True
Application.Wait (Now + TimeValue("0:00:01"))
Columns("S").Hidden = True
Application.Wait (Now + TimeValue("0:00:01"))
Columns("T").Hidden = True
Application.Wait (Now + TimeValue("0:00:01"))
Columns("U:").Hidden = True

How do i define a time less than a second ?

Hoping for an answer


Regards,
Claus




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Wait less than a second

Yes, it should be sleep. Just had your wait in mind.

RBS

"Claus" wrote in message
...
Thank you

It works when i replace "Wait" with "Sleep"

Regards,
Claus
"RB Smissaert" skrev i en meddelelse
...
Put this at the very top of your code module:

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Then where you want to wait put something like this:

Wait 500 'wait 0.5 seconds


RBS


"Claus" wrote in message
...
Hi

I would like to delay the hiding of 4 columns, someting like

Columns("R").Hidden = True
Application.Wait (Now + TimeValue("0:00:01"))
Columns("S").Hidden = True
Application.Wait (Now + TimeValue("0:00:01"))
Columns("T").Hidden = True
Application.Wait (Now + TimeValue("0:00:01"))
Columns("U:").Hidden = True

How do i define a time less than a second ?

Hoping for an answer


Regards,
Claus





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sendkeys(keys,wait) how do I use wait MM Excel Discussion (Misc queries) 1 February 11th 09 03:47 PM
Should I Wait? Chaplain Doug Excel Discussion (Misc queries) 0 February 6th 07 04:58 PM
.wait for 1/2 a second Brad Excel Programming 18 June 9th 05 03:44 PM
is there a code to wait? choice[_2_] Excel Programming 1 January 8th 05 06:47 AM
wait Eddie[_4_] Excel Programming 3 November 15th 03 03:37 PM


All times are GMT +1. The time now is 07:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"