Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2006

Tip: Looking for answers? Try searching our database.

connecting 2 inputboxes and using the autofill

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 28 Sep 2006 18:16 GMT
What I am trying to do is use the data entered in one inputbox with the data
entered from a 2nd input box.  I an trying to make a macro so that the user
can make consecutively numbered labels with the push of a button, so the
button would bring up the 1st inputbox asking what number to start at and
then a 2nd inputbox would appear asking how many to make (how far down the
list to go).  I can get the 2 inputboxes to pop up and I can get the boxes to
dump the numbers into a sheet.  I know you can use the autofill function but
I am not sure how to connect them all so that the user can just enter the 2
numbers and the macro will fill to the appropriate number.  Any help would be
great!  Thanks
Tom Ogilvy - 28 Sep 2006 20:29 GMT
Perhaps this pseudo code will give you some idea
a = Inputbox      ' start number
b = Inputbox      ' number of cells to "fill"

a1 = a
for i = 1 to b
activecell.Offset(i-0,1).Value = a1
a1 = a1 + 1
Next

Signature

Regards,
Tom Ogilvy

> What I am trying to do is use the data entered in one inputbox with the data
> entered from a 2nd input box.  I an trying to make a macro so that the user
[quoted text clipped - 6 lines]
> numbers and the macro will fill to the appropriate number.  Any help would be
> great!  Thanks
Mike - 28 Sep 2006 20:51 GMT
That worked Great!  Thanks so much...I am just playing around with it now to
figure out why the list comes up offset but I think that I should be able to
figure that one out.  Thanks again!

> Perhaps this pseudo code will give you some idea
> a = Inputbox      ' start number
[quoted text clipped - 16 lines]
> > numbers and the macro will fill to the appropriate number.  Any help would be
> > great!  Thanks
Tom Ogilvy - 28 Sep 2006 21:51 GMT
Looks like tangled fingers on my part

activecell.Offset(i-0,1).Value = a1

should be

activecell.Offset(i-1,0).Value = a1

Signature

Regards,
Tom Ogilvy

> That worked Great!  Thanks so much...I am just playing around with it now to
> figure out why the list comes up offset but I think that I should be able to
[quoted text clipped - 20 lines]
> > > numbers and the macro will fill to the appropriate number.  Any help would be
> > > great!  Thanks
Mike - 29 Sep 2006 12:37 GMT
Thanks!!

> Looks like tangled fingers on my part
>
[quoted text clipped - 28 lines]
> > > > numbers and the macro will fill to the appropriate number.  Any help would be
> > > > great!  Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.