473,387 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How do I create scrolling text

1
I'm new to visual basic but trying to learn more...
I'm currently working in excel trying to get a macro that will scroll down through a list of cells. The problem I'm running into is that I need the macro to stop for 1 second at each cell before continuing to scroll down.

Any ideas?

-Jack Arthmor
Oct 16 '07 #1
1 1444
kadghar
1,295 Expert 1GB
... need the macro to stop for 1 second at each cell before continuing to scroll down.
The problem with VBA is that you don't have timers, but you can use a DO loop with a DoEvents in it, let's say you want a macro that selects cell "A1" and after that each second it selects the one below, something like this should do:

Expand|Select|Wrap|Line Numbers
  1. Sub test()
  2. Dim i As Long
  3. Cells(1,1).Select
  4. t = Timer
  5. i = 2
  6. Do
  7.     If t = Timer Then
  8.         t = Timer + 1
  9.         i = i + 1
  10.         Cells(i,1).Select
  11.     End If
  12.     DoEvents
  13. Loop
  14. End Sub
Please note it's an endless loop, so if you want to stop it just press Ctrl+Brk
or write instead of loop something like

Loop Until i = 10 (to repeat it only 10 times), or
Loop Until Cells(i,1) = "" (to repeat it until it finds an empty cell)

HTH
Oct 16 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Midas NDT Sales | last post by:
I have been looking at a simple example of a scrolling text box (the one in the SAM book) as below: <script language="JavaScript"> var pos=100; function Scroll() { if...
44
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to...
1
by: Wesman | last post by:
Threads, textboxes and scrolling Thanks in advance for any information on this matter. I have run into a small richtextbox, scrolling and tread issue. Which has me totally confused. Instead of...
2
by: P2P | last post by:
Hi I am wondering if someone know of a free cross-browsers vertical scrolling script that - is cross cross-browsers - will call the scrolling content from an external html page or from a...
4
by: Keith Bentrup | last post by:
Hi all, I wrote a simple search function to find text in a textarea where not all the text is visible (ie. the text box displays 10 lines but there may be more than 1000 lines to search). I can...
5
by: PythonistL | last post by:
I am a newbie with Javascript. I have this simple script for scrolling text <HTML> <HEAD> <TITLE>Scrolling Message Script</TITLE> <SCRIPT language="JavaScript"><!-- var msg = 'My scrolling...
1
by: Thorsten Kleinweber | last post by:
Hello, I did some first steps in programming a site for a friend and have some questions concerning web design. The site is http://www.stevanez-juls.de: 1. On my tft display (with low...
1
by: ranj | last post by:
HI, I am trying to create a scrolling Banner as like in TV News Channels to display share values, something like that. (The Banner should run on Desktop, not an application) The Banner should take...
3
by: Chamnap | last post by:
Hello everybody, I have one problem. I want to do something after the user finished scrolling. The scroll event fires whenever the user is scrolling. I don't want this actually. Does anyone has...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.