Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 661
Default FileDialog Box Question

Hello and good morning, I am trying to use a filedialog object to get a path
from a custom DLL. The code in the DLL is the following:

--- Code Snippet ---
Function GetNumb() As String
Set FP = Application.FileDialog(msoFileDialogFolderPicker)
With FP
.Title = "Folder Picker"
End With
If FP.Show < 0 Then
GetNumb = StrConv(FP.SelectedItems.Item(1) & "\", vbFromUnicode)
Else
MsgBox "user hit Cancel"
End If
End Function

---Code Snippet ---

My question/behavour is this. When I choose the Save/Cancel Buttons. The
code starts a new Excel object (I think it is an object because in my taskbar
I have another Excel window. If I try and maximize it it just is a blank
workbook. The Excel works code works but this blank workbook is there. Here
is how I am calling the function. It seems that the code executing when
selecting the Open/Cancel buttons does not have the focus.
One of the things I was going to try was to minmize Excel afer executing the
code when the Open/Cancel button. but the problem with the additional
workbook still has me baffled.
Any suggestions please let me know.
BTW: This code works perfectly outside the DLL.
Thanks for any input.

--- Code Snippet ---
Private Declare Function GetNumb Lib "g:\paul\stringsPart2\string2dll.dll"
() As String

Private Sub CHKNet()
Dim Default_DIR As String
Default_DIR = GetNumb
MsgBox Default_DIR
End Sub




Reply
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
using a filedialog box from a dll Paul Excel Programming 2 April 26th 06 04:56 PM
FileDialog AMDRIT Excel Programming 1 October 21st 05 10:17 PM
FileDialog - Not available in 2k? RWN Excel Programming 3 March 12th 05 05:25 AM
FileDialog Help Maynard Excel Programming 0 August 4th 04 01:43 PM
FileDialog Jag Man Excel Programming 3 February 2nd 04 04:50 AM


All times are GMT +1. The time now is 04:43 PM.

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"