MSFN Forum: input box macro - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

input box macro problem with multiple inputs Rate Topic: -----

#1 User is offline   discarnet 

  • Junior
  • Pip
  • Group: Members
  • Posts: 50
  • Joined: 21-January 04

Posted 12 May 2006 - 01:52 PM

Ok let me try to explain this
I have an input box on a loop to enter names, as i have over 200 names to enter on a weekly basis
how can i get the macro to move down a cell for each entry from the input box

this is what i have so far

sub rota()
RO = 1
START:
ent = ("enter name for rota e1a0")
ent = ent & RO
E1A = InputBox(ent, "ENTER NAMES")
If E1A = "QUIT" Then Exit Sub
RO = RO + 1
Worksheets(1).Range("b5").Value = E1A
GoTo START
End Sub

so first time input is for rota e1a01
second time input is for rota e1a02
and so on up to 242
rota numbers from e1a01 to e1a242 are in coloum A names from input box need to be in coloum B
so its the ("b5") in Worksheets(1).Range("b5").Value = E1A that i need to increase each time

Well i understand what i mean :blink: hope you do

This post has been edited by discarnet: 12 May 2006 - 01:55 PM



#2 User is offline   discarnet 

  • Junior
  • Pip
  • Group: Members
  • Posts: 50
  • Joined: 21-January 04

Posted 12 May 2006 - 03:55 PM

DON'T WORRY ABOUT IT WORKED IT OUT :)

Sub na()
ro = 1
START:
For x = 5 To 100
ent = ("enter name for rota e1a0")
ent = ent & ro

e1a = InputBox(ent, "ENTER NAMES")
If e1a = "QUIT" Then Exit Sub


Cells(x, 2) = e1a
ro = ro + 1
Next x

End Sub

Thanks for looking anyway :thumbup

#3 User is offline   snuppe 

  • Group: Members
  • Posts: 6
  • Joined: 03-December 06

Posted 04 December 2006 - 12:13 AM

nice!

I have been looking for this solution as well!

Thanks for posting!

/Snuppe

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy