LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Excell FileOPenDialog from another App, and listbox multiselect problems

I have 2 problems -
First, I am using a list box and have "multi-select extended" enabled. When
I click in the box, I want to enable a button if an item is selected,
disable if no items are selected. Problem is, with multi select enabled, my
box won't detect the click. With simple select, this works, but I want
multi. Am i missing something obvious?

Problem 2 :
I am running a vba macro from another application, which it appears doesn't
have a File open Dialog box.
I thought I could use the Excel GetOpenFileName Dialog (code follows)
This works, but obviously I'm doing something wrong here, because I get a
"Server Busy - Switch Apps or Retry" Dialog right after the GetOpenFileName
closes (gives me the filename, but this dialog warning is annoying)
Could someone tell me what I'm doing wrong here, too?

Private Sub btnBrowse_Click()
On Error GoTo Err_btnBrowse_Click
Dim fl As File
Dim eApp As New Excel.Application
'Get the path to a file with the file open dialog box
Set fl = fso.GetFile(eApp.GetOpenFilename)
eApp.Quit
Set eApp = Nothing
txtDirectory.Value = fl.ParentFolder

Err_btnBrowse_Click:
'Do Nothing
End Sub

Thanks in Advance...

--

/ Sean the Mc /


"I have not failed. I've just found 10,000 ways that won't work."
- Thomas Alva Edison (1847-1931)


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiselect Listbox use RKS Excel Discussion (Misc queries) 1 May 12th 06 03:04 PM
Multiselect listbox selection question Paul Mueller Excel Programming 3 June 16th 04 09:25 PM
MultiSelect ListBox in Excel PeteSmith Excel Programming 1 April 20th 04 11:14 AM
Excel VBA-Looping though MultiSelect on ListBox jpendegraft[_3_] Excel Programming 2 February 3rd 04 04:38 PM
multiselect listbox CG Rosén Excel Programming 2 December 28th 03 05:17 PM


All times are GMT +1. The time now is 02:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"