PC Review


Reply
Thread Tools Rate Thread

directory structure in VBA form.

 
 
mark
Guest
Posts: n/a
 
      1st Oct 2008
I'd like to put a control into a VBA form that would allow the user to select
an input file. I can do that with the common dialog control, or the
GetOpenFilename method.

But, a variety of other inputs are required, and sending the user to another
interface seems clunky.

Is there a good control for using right in a VBA form?

Thanks,
Mark
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      1st Oct 2008
Why not just a commandbutton with a caption of Open.



mark wrote:
>
> I'd like to put a control into a VBA form that would allow the user to select
> an input file. I can do that with the common dialog control, or the
> GetOpenFilename method.
>
> But, a variety of other inputs are required, and sending the user to another
> interface seems clunky.
>
> Is there a good control for using right in a VBA form?
>
> Thanks,
> Mark


--

Dave Peterson
 
Reply With Quote
 
mark
Guest
Posts: n/a
 
      1st Oct 2008
"Open" the file?

The further details are that there are a list of inputs that the user must
give, for different choices of what project to run the program (a comparison
of procurement info) on. At first, the system was the brain child of one
person, to be used by one department. As such, it was developed to use
sheets within the file itself, to take the input. Procurement could put in
the info once, and then just pick the sheet that described their run time
choices.

But after the system was mostly done, the Operations department got wind of
it, and the expanded system now does similar things for them.

But, the concern is that since the input is taken from sheets within the
Excel file that is accessible to everybody ("everybody" used to be just one
person), the input data/constraints/item change history is vunlerable to
other people deleting someone else's input info.

So, if the same info that is now on sheets within one file, were in seperate
files controlled by the multple users, they could each have their own input
files, without having it be subject to the deletion of another.

But I'm not sure how an "Open" command button would do what I'm looking for?
At best, it would take you to something else which then asked you, "Which
file is your input file?" Which leads to the multiple user interfaces that I
mentioned before. I can do it, but I was hoping for a better way, within the
"clean-ness" of one user interface.

"Dave Peterson" wrote:

> Why not just a commandbutton with a caption of Open.
>
>
>
> mark wrote:
> >
> > I'd like to put a control into a VBA form that would allow the user to select
> > an input file. I can do that with the common dialog control, or the
> > GetOpenFilename method.
> >
> > But, a variety of other inputs are required, and sending the user to another
> > interface seems clunky.
> >
> > Is there a good control for using right in a VBA form?
> >
> > Thanks,
> > Mark

>
> --
>
> Dave Peterson
>

 
Reply With Quote
 
mark
Guest
Posts: n/a
 
      1st Oct 2008
I think I didn't explain well how the current system works.

the current system has a button on the first sheet, which opens the VBA form.

withink the VBA form, there is a listbox which lists the name of every other
sheet in the file.

The user selects which of those sheets is the report that he/she currently
wants to use as the input for their current report run.


 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      1st Oct 2008
Maybe you could have the users open their own file before they show the
userform. Then just update the activesheet.

It would be up to the user to make sure that they've opened the correct workbook
and activated the correct worksheet.

But you could check to make sure that the activesheet looked right--you could
check to see that the headers are correct before doing any processing.

But I'm not sure I understand the problem with having a button that will ask the
user to select the correct workbook (via an open button that uses
application.getopenfilename) and then allows the user to select the correct
worksheet.

mark wrote:
>
> "Open" the file?
>
> The further details are that there are a list of inputs that the user must
> give, for different choices of what project to run the program (a comparison
> of procurement info) on. At first, the system was the brain child of one
> person, to be used by one department. As such, it was developed to use
> sheets within the file itself, to take the input. Procurement could put in
> the info once, and then just pick the sheet that described their run time
> choices.
>
> But after the system was mostly done, the Operations department got wind of
> it, and the expanded system now does similar things for them.
>
> But, the concern is that since the input is taken from sheets within the
> Excel file that is accessible to everybody ("everybody" used to be just one
> person), the input data/constraints/item change history is vunlerable to
> other people deleting someone else's input info.
>
> So, if the same info that is now on sheets within one file, were in seperate
> files controlled by the multple users, they could each have their own input
> files, without having it be subject to the deletion of another.
>
> But I'm not sure how an "Open" command button would do what I'm looking for?
> At best, it would take you to something else which then asked you, "Which
> file is your input file?" Which leads to the multiple user interfaces that I
> mentioned before. I can do it, but I was hoping for a better way, within the
> "clean-ness" of one user interface.
>
> "Dave Peterson" wrote:
>
> > Why not just a commandbutton with a caption of Open.
> >
> >
> >
> > mark wrote:
> > >
> > > I'd like to put a control into a VBA form that would allow the user to select
> > > an input file. I can do that with the common dialog control, or the
> > > GetOpenFilename method.
> > >
> > > But, a variety of other inputs are required, and sending the user to another
> > > interface seems clunky.
> > >
> > > Is there a good control for using right in a VBA form?
> > >
> > > Thanks,
> > > Mark

> >
> > --
> >
> > Dave Peterson
> >


--

Dave Peterson
 
Reply With Quote
 
mark
Guest
Posts: n/a
 
      1st Oct 2008
Thanks for the idea. Yeah, I could do that. In fact, on several
applications, I have. If a workbook is open, it uses that as the input. If
no other workbook is open, it asks the user to select their input workbook.

Maybe it's just my concept of change in this area that's out of whack. This
whole thing started almost 10 months ago, and I had the first demo/cut done
pretty quickly... Think maybe it's just my head that's gotten too attached to
the existing form.

But anyway, after the sheet with the input parameters is selected, the rest
of the coding change is easy... the code uses 5 range variables which define
where the inputs are. It's written so that one set of inputs can kick of
multiple loops and in the end compare the whole bunch, if that's what the
user wants.

But anyway, changing the input is easy... just change the assignments on the
controlling range variables.

Thanks for the continued suggestion.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Directory Structure to XML DOM? xeroxero Microsoft Dot NET Framework 0 20th Oct 2006 04:53 AM
Web Setup project - create virtual directory & point to another location in directory structure kplkumar@gmail.com Microsoft C# .NET 0 12th Apr 2006 06:26 PM
directory structure Matt J. Microsoft Excel Discussion 4 12th Jul 2004 02:58 PM
Re: Directory Structure starting with the Current Directory. Lydya Microsoft Excel Misc 0 17th Sep 2003 12:03 PM
Directory Structure starting with the Current Directory .. Neeraja Microsoft Excel Misc 0 16th Sep 2003 10:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:18 PM.