Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default Simple Macro

I am a long time lotus user and am now required to use Excell. I wrote my
first macro--a very simple one, but I want it to continue until I tell it to
stop. It runs through and doesn't complete a loop.

Here is the Macro:
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = "x"
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(1, 0).Select
Selection.End(xlToLeft).Select
Do While ActiveCell.Value = (blank)
Loop
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,089
Default Simple Macro

Not entirely sure what your data might look like or what you want to achieve
but try this:

Do While ActiveCell.Value = ""
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = "x"
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(1, 0).Select
Selection.End(xlToLeft).Select
Loop

Regards

Trevor


"MAStew" wrote in message
...
I am a long time lotus user and am now required to use Excell. I wrote my
first macro--a very simple one, but I want it to continue until I tell it
to
stop. It runs through and doesn't complete a loop.

Here is the Macro:
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = "x"
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(1, 0).Select
Selection.End(xlToLeft).Select
Do While ActiveCell.Value = (blank)
Loop
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default Simple Macro

Trevor,
It's just a macro to do data entry, which is just the first part of my
worksheet. I wasn't a great macro writer before, but am now really stumped.
Thank you for your help, this worked.

MA

"MAStew" wrote:

I am a long time lotus user and am now required to use Excell. I wrote my
first macro--a very simple one, but I want it to continue until I tell it to
stop. It runs through and doesn't complete a loop.

Here is the Macro:
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = "x"
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = InputBox("EnterValue")
ActiveCell.Offset(1, 0).Select
Selection.End(xlToLeft).Select
Do While ActiveCell.Value = (blank)
Loop
End Sub

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
link to combobox legepe Excel Discussion (Misc queries) 4 July 26th 06 04:45 PM
How to stop Excel remembering/loading macro from previously opened Workbook Norman Yuan Excel Discussion (Misc queries) 4 June 17th 06 04:13 PM
Need Simple Macro jreinert New Users to Excel 2 June 15th 06 03:58 PM
Macro Help In Excel welshlad Excel Discussion (Misc queries) 14 October 26th 05 02:34 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM


All times are GMT +1. The time now is 01:55 PM.

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

About Us

"It's about Microsoft Excel"