Create User Form

Hello All, 

I want to be able to create a user form with the following:- 

1) Drop down box to show all listed directories i.e. c:\, a:\ etc 
2) List box to show all files listed in the selected directory (above

3) A command button to open the file selected 


I am familiar with userforms but not sure what the coding is to achiev
this. 

Any advice will be greatfully received. 

Regards, 
PAUL

--
LEXCER
-----------------------------------------------------------------------
LEXCERM's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1521
View this thread: http://www.excelforum.com/showthread.php?threadid=32038

0
11/25/2004 12:45:21 PM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
295 Views

Similar Articles

[PageSpeed] 28

Why not just show a file|open dialog box and let the user traverse the folders:

Option Explicit
Sub testme()
    Dim myFileName As Variant
    Dim SourceWkbk As Workbook
   
    myFileName = Application.GetOpenFilename("Excel files,*.xls")
    
    If myFileName = False Then
        Exit Sub 'user hit cancel
    End If

    Set SourceWkbk = Workbooks.Open(Filename:=myFileName)
    ''' rest of your code

End Sub

LEXCERM wrote:
> 
> Hello All,
> 
> I want to be able to create a user form with the following:-
> 
> 1) Drop down box to show all listed directories i.e. c:\, a:\ etc
> 2) List box to show all files listed in the selected directory (above)
> 
> 3) A command button to open the file selected
> 
> I am familiar with userforms but not sure what the coding is to achieve
> this.
> 
> Any advice will be greatfully received.
> 
> Regards,
> PAUL.
> 
> --
> LEXCERM
> ------------------------------------------------------------------------
> LEXCERM's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=15219
> View this thread: http://www.excelforum.com/showthread.php?threadid=320380

-- 

Dave Peterson
0
ec357201 (5290)
11/25/2004 1:38:02 PM
Thanks Dave for your prompt reply.

I use the method that you suggested all the time, but I have com
across a situation whereby I have coded the Open dialog box to pop-u
midway through a macro.  If a user hit's ESC whilst the dialog box i
showing, the macro bombs-out and leads to complications.  I have se
"enablecancel" to disabled so that a user cannot interrupt the macr
whilst it's running, but it seems to ignore the ESC key when the dialo
box is showing, and stops the macro.

The other reason that I would like to create a user form is to expan
my knowledge in this area.  Knowledge is power!!! lol

Regards,
PAUL

--
LEXCER
-----------------------------------------------------------------------
LEXCERM's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1521
View this thread: http://www.excelforum.com/showthread.php?threadid=32038

0
11/25/2004 2:07:28 PM
I've never seen hitting escape kill the rest of the macro (with a simple
validation later--it should work like hitting cancel).

To get the folder,

If you're using xl2002+, you can read about:
Application.FileDialog
in VBA's help.

If before, then Jim Rech has a BrowseForFolder routine at:
http://www.oaltd.co.uk/MVP/Default.htm
(look for BrowseForFolder)

Or John Walkenbach's:
http://j-walk.com/ss/excel/tips/tip29.htm

And maybe read about application.filesearch in VBA's help to get a list of
files.


LEXCERM wrote:
> 
> Thanks Dave for your prompt reply.
> 
> I use the method that you suggested all the time, but I have come
> across a situation whereby I have coded the Open dialog box to pop-up
> midway through a macro.  If a user hit's ESC whilst the dialog box is
> showing, the macro bombs-out and leads to complications.  I have set
> "enablecancel" to disabled so that a user cannot interrupt the macro
> whilst it's running, but it seems to ignore the ESC key when the dialog
> box is showing, and stops the macro.
> 
> The other reason that I would like to create a user form is to expand
> my knowledge in this area.  Knowledge is power!!! lol
> 
> Regards,
> PAUL.
> 
> --
> LEXCERM
> ------------------------------------------------------------------------
> LEXCERM's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=15219
> View this thread: http://www.excelforum.com/showthread.php?threadid=320380

-- 

Dave Peterson
0
ec357201 (5290)
11/25/2004 2:24:23 PM
Reply:

Similar Artilces:

cannot create profiles in win 7 mail 32 bit
I upgraded to WIndows 7 professional 64 bit and still cannot get my MS Office 2003 to work properly. All the programs except Outlook seems to work fine. I am totally unable to open outlook without mail profiles. I click on mail in control panel and I get low memoery or resources too low. That's impossible. I have 4GB RAM and 1GB VRAM. In addition, I noticed to night that while I created a profile for myself as Admin, I do ot have admin permissions EVEN IF I say 'run as admin" If I open my profile, it syas Admin under my name yet shows up as standard user. I...

Forms 07-27-07
Hi, A VB Code is used that has the following line: Me.Visible = False (Me refers to the forms names frmBirthsearch) After this line a second form (form2) is opned based on a query that reads two dates from the frmBirthsearch using the line code: DoCmd.OpenForm "frmBirthdates", acViewNormal at this point frmbearthsearh is hidden. What command shold I add after this in order to close the frmbirthsearch? ...

Additional lookup for contacts on opportunity form
Hi, I try to customise CRM 3.0 without any training - therefore a question for which I need some help. On the opportunity form exists a look-up (potentional customer) for contacts/accounts. I'd like to add an aditional one to the form (to replace the decision maker). I tryed to create a new field on the opportunity entity but there's no field-type "look-up". It's also not possible to create a new relationship to the contact entity (both system entity's). Does anybody of you know how I can do this? (if yes - please explain it more detailed...). Thanks Joerg Look...

Creating a table
There's probably an easier way to do it but... I have a series of numbers in column A (150 in all) and a series of letters in column B (22 in all). In total there are 4800 rows. What I am trying to do is create a table with the number down the left hand side and the letters across the top. In each cell within the table I need to count how many times the combination of number/letter appears. Eg: A B C 201 0 2 2 202 3 0 1 203 3 6 4 I tried combining the number/letter into a single text field using the CONCATENATE function then filtering ...

Creating a letter from template
Is it possible in CRM? So far the only way i figured out to use templated is in an email and /KB-article. (And order offcourse) The thing i'm looking for is when selecting a contact, somehow i can make a letter activity and call a template that puts name & adress data etc. After that i should be able to print the letter, to put it in an enveloppe and send it someplace... So far it seems to me this cannot be done, but then again, i'm certainly not a CRM expert... Is it possible? If so, can anyone provide me the actions to be taken step by step ? thanks Kas "_Kas_&...

Simple Question-How to create more than one transaction on the Acc
If there is a question already posted let me know. The question is: I created a bank account information on the Account list icon and want to have more than (one)transactions listed and see each payee displayed separately on each page so i could have all the months posted with due dates and total listed. Thank you. In microsoft.public.money, a.j. wrote: >If there is a question already posted let me know. The question is: I created >a bank account information on the Account list icon and want to have more >than (one)transactions listed and see each payee displayed separately ...

How to create an "and" rule in Query Based Distribution Groups
Hi, With Exchange 2003 Query Based Distribution groups, is it possible to create an "and" rule? ie, all users who are based in "London" "and" have the first name "John"? Thanks, Curtis. -- Please reply to news group only. Thank you. Sure. (&(attribute1=blah)(attribute2=blah)) http://msdn.microsoft.com/library/en-us/adsi/adsi/search_filter_syntax.asp?frame=true -- Bharat Suneja MCSE, MCT www.zenprise.com blog: www.suneja.com/blog ----------------------------------- "Curtis Fray" <xxx@xxx.com> wrote in message news:OjVc...

Creating a print-macro that'll only print page 1?
Hi, I have a spreadsheet that contains multiple sheets. I want to add a button that runs a macro, which only prints page 1 on the first sheet (called Scorekort). The "Scorekort" sheet contains 13 pages in total, but I only want to print the first page. Any ideas for this macro? Anders hi, Sub Macro1() Sheets("Scorekort").PrintOut From:=1, To:=1, Copies:=1, Preview:=True, Collate:=True End Sub if you don't want a print preview, Preview:=False -- isabelle Le 2011-05-21 04:16, Anders M a �crit : > Hi, > > I have a spreadsheet that contains multiple ...

Email accounts are not created for new user
I had a severe system crash several days ago because of bad memory in my domain controller (Server 2003 R2)/Exchange server 2003 (small site - no extra systems). I had to reinstall Exchange 2003 and reload the exchange store from backup. For existing users everything works great. Everybody can send and receive email, the calender works correctly, etc. OWA works. However, when I create a new user account in Active Directory Computers and Users, the account is created and the new user can log onto a system. However, Outlook 2003 cannot be configured to use the exchange server. In t...

Somehow I created a Macro in a worksheet.
I created a macro in an Excel worksheet somehow. I didn't try to, it just happened. Now everytime I open that workbook, it asks me if I want to run the macro, disable it, etc. How the hell do I get rid of the macro? It doesn't show up under tools, macros. And it apparently doesn't do anything either because I can disable it and nothing different happens. Who invented this system anyway? Thanks, V When you record a macro, a module is created to store the macro code. There are instructions here for removing the module that is causing the prompt to appear: http://www.c...

Error 2455 Closing Access 2007 database with form open
I have a form with a subform that is requeried when you select a new key for the main form from a combo box. Everything works fine - usually. But sometimes if you have the form open when you close the database down you get the following error message (twice) in a pop up. You say OK (twice) and the database closes OK "2455 you entered an expression that has an invalid reference to the property form/report" If I close the form before the database I never get the error. If I do not touch the form before you close the database I don't get the error. If I update a field by t...

we do not create seperate http virtual server anymore?
Hi all, Just want to confirm that we do not need to create the seperate http virtual server for FE/BE (backend two node A/P Exchange 2003 cluster), right? I remember I need to create it in Exchange 2000 FE/BE clustering envir. Thanks in advance. On Wed, 2 Aug 2006 11:44:26 -0700, John <John@discussions.microsoft.com> wrote: >Hi all, > >Just want to confirm that we do not need to create the seperate http virtual >server for FE/BE (backend two node A/P Exchange 2003 cluster), right? I >remember I need to create it in Exchange 2000 FE/BE clustering envir. > >...

Error creating new task
Error .. "Could not complete operation. One or more parameter values are not vaild" ...

Keeping a table in a form editable and checking that fields are filled in before allowing a save
Firstly apologies if this is the incorrect forum but I was looking for a general word forum and could not find one. Please point me to one if one exists. I am trying to create a form where I want to specify what items need to be filled in. (Review minutes from design reviews). I want to make certain fields mandatory like the date, attendees and check list used and want to block saving of the document with a warning until they are filled in. Is there a way of doing this? Also as a part of the review actions are filled in to a table. depending on how many actions there are the table...

create main configuration file for solution.
Hello. How can I create main configuration file for my solution (Win-Form : VS 2008. VB.NET), like a general ini-file. Thanks :) "Mr. X." wrote: > Hello. > How can I create main configuration file for my solution (Win-Form : VS > 2008. VB.NET), like a general ini-file. > It's called an app.config. There is a name space you can use to mainulupate the app.config from a program. I see it on the project source directory (not for solution). I cannot see it on the release directory. Is there any convention to read / write from app.config...

Creating Contacts For Accounts Using...
Hopefully as Microsoft CRM matures, many small time saving features will be added. One that should be a priority is the ability to add a new contact for an existing account using the common account information, i.e. address, phone number, web address, etc. Retyping the same company address in each time is not very productive. Thank you, Ed Podowski ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, f...

WdfUsbTargetDeviceCreate creates NULL Control Pipe Handle
Hi, We have a usb composite device which has one mass storage interface and another as a network interface. We are developing a WDF driver (NDIS-USB) for the network interface. Immediately after WdfUsbTargetDeviceCreate if I break into the debugger and examine the newly created device, then I see that the Control Pipe Handle is NULL! Here is the actual output: -------- kd> !WDFUSBDEVICE 0x0000057f`fe5905f8 WDFUSBDEVICE 0000057ffe5905f8 ============================= Config descriptor fffffa80037216b0, device descriptor fffffa8001a6fb58 Control USBD_PIPE_HANDLE 000000000000...

Scroll horizontaly with mouse, create same system used to scroll .
Hi, I think it would be great if mouses adopted a second scroll button, for horizontal scrolling, just like the vertical one .... Indeed, when you work with wide Excel spreadsheets, you can easily scroll down but to scroll from left to right or vice-versa, you have to use the scroll bar or arrows and it's annoying... So, am I a millionnaire yet??? Hi Frederic, > I think it would be great if mouses adopted a second scroll button, for > horizontal scrolling, just like the vertical one .... Indeed, when you work > with wide Excel spreadsheets, you can easily scroll down b...

Create individual files from a row
I have an excel file with several thousand entries, which contain data in several columns. I would like to be able to create an individual xml or html file for each row, but with predifined formatting around so Mr A bloggs, A street, A town, AA1 1AA Could become Abloggs.html <head></head> <name>Mr A bloggs</name> <street>A street</street> Any other info here as well </html> etc. Is this possible and any suggestions how? thanks, Graham. -- GrahamN ------------------------------------------------------------------------ GrahamN's Profile: ...

Cannot create mailbox for new user accounts
I am running Exchange 2003 on Server 2003. I was able to move all existing mailboxes from my old Exchange 2000 server to my new 2003 server. Whenever I try to create a new user it creates the user normally and asks if I want to create a mailbox for the user. I check yes, and it says account created successfully. However, the mailbox never appears in Exchange, no email address is assigned to the new user, and I cannot send mail to the user account either. If I try to access any Exchange properties from ADUC it shows everyhting as if a mailbox exists, but there is no mailbox. I am ...

obtaining data in text form from a table
Hi all, I like to be able to obtain the dates in a text format from the table below. ie Test2 8-Feb Test5 4-Feb,8-Feb Test6 4-Feb,5-Feb, 9-Feb Do I need to do this by macros and if so, any help would be appreciated. Table Care Recipient Surname 4-Feb 5-Feb 8-Feb 9-Feb Test1 Test2 8-Feb Test3 Test4 Test5 4-Feb 8-Feb Test6 4-Feb 5-Feb 9-Feb Vlookup should do what you want, as in: =vlookup(a2,Table,2,false) Adjust the ranges t...

Help with Synchronizing a user folder with a Public Folder
Hi: Hoping that someone can offer a suggestion on this one. I'd like to be able to synchronize an email folder in a particular users' Outlook account with a public folder. The idea is to have email conversation threads in a particular folder (just one folder) visible to others in the group via the public folders. Ideally, it would be great if changes to the public folder are instantly mirrored in the users folder - but that requirement is not critical, the core requirement is to have the public folder mirror the user's folder (in real time). I know that I could accomplis...

Remote users cannot send e-mail through Outlook
I have a few users who do not work in our office. They have Outlook installed on their home computers and then dial up to the internet and do a send/receive. I have Exchange 2k3 on a Windows 2k server and the users are configured to allow for SMTP/POP3. All was working fine until earlier this week when they informed me that they could no longer "send" mail. They get the message "The TCP/IP connection was unexpectedly terminated by your mail server. If this problem persists, contact your LAN Administrator or Internet Provider". The users can still receive mail ...

How do I create custom postcards in Word 2007?
I want to create my own postcards using the right size and type of paper for mailing. This depends entirely on your printer. Can it handle the heavy weight of card used in postcards, and can it handle the unusual size of a postcard? On Apr 18, 2:54=A0pm, Create Custom Postcards <Create Custom Postca...@discussions.microsoft.com> wrote: > I want to create my own postcards using the right size and type of paper = for > mailing. Perhaps the easiest way to start is to get some Avery (or similar) postcard stock, which will have two postcards per sheet. Then find the a...

forms and column lengths
Is there a way to have excel do an auto "carriage return" to the next row when you have reached the specified maximum number of characters in the row above?? Hi there's n o bulit-in feature for this -- Regards Frank Kabel Frankfurt, Germany "Blair" <Blair@discussions.microsoft.com> schrieb im Newsbeitrag news:C1D2CAAD-C4E9-492A-ADF4-CBDB659514A3@microsoft.com... > Is there a way to have excel do an auto "carriage return" to the next row > when you have reached the specified maximum number of characters in the > row > above?? ...