Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
link to combobox | Excel Discussion (Misc queries) | |||
How to stop Excel remembering/loading macro from previously opened Workbook | Excel Discussion (Misc queries) | |||
Need Simple Macro | New Users to Excel | |||
Macro Help In Excel | Excel Discussion (Misc queries) | |||
Copy cell format to cell on another worksht and update automatical | Excel Worksheet Functions |