Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
using a filedialog box from a dll | Excel Programming | |||
FileDialog | Excel Programming | |||
FileDialog - Not available in 2k? | Excel Programming | |||
FileDialog Help | Excel Programming | |||
FileDialog | Excel Programming |