filedialog

Filepicker VBA to select file and store the file name not working

断了今生、忘了曾经 提交于 2021-02-05 09:55:08
问题 I am trying to run the following in order to get the file name that the user selects. The file is an .mdf file that is attached previously to an SQL server. But when I run it, a window comes out and says I don't have permission to open the file. I know it is because it is being used in SQL, because if I don't attach it in the SQL server it runs without a problem. The thing is that I need the mdf in SQL before running the vba code and I just need the file name. Is there a way to store the file

Folder Picker Excel VBA & paste Path to Cell

情到浓时终转凉″ 提交于 2021-01-29 07:23:26
问题 I am having difficulty figuring out how to put the Folder Path in Cell C49. I'd like to have the Path there for the User to understand where they are searching and if they have to change said Path. I got this VBA code from, http://learnexcelmacro.com/wp/2016/12/how-to-open-file-explorer-in-vba/ Private Sub cmd_button_BROWSEforFolder_Click() On Error GoTo err Dim fileExplorer As FileDialog Set fileExplorer = Application.FileDialog(msoFileDialogFolderPicker) 'To allow or disable to multi select

OpenFileDialog causes WPF app to crash

狂风中的少年 提交于 2021-01-28 06:19:52
问题 In my WPF Application I used OpenFileDialog to select an image and load it to app, this works fine as expected. But if I run same app from a flash drive, image loades after that UI freezes, any clicks on UI makes app to crash. I have admin manifest to app also. 回答1: I couldn't find a good explanation but I solved this problem setting the InitialDirectory with a valid local path (e.g., Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) 回答2: I've seen something similar to this

how to use open file dialog?

半腔热情 提交于 2020-12-06 13:31:52
问题 i am trying to write a code to encrypt text using public key and decrypt using private key and passphrase. I am not very good with programming language because i'm not a programming student. But for my mini-project, i need to write some program about encryption. For the below code uses a text file from my c drive to encode using the public key. But i want to use openfiledialog to choose the file instead of directing it manually(not really practical) Really appreciate if anyone can help me

how to use open file dialog?

China☆狼群 提交于 2020-12-06 13:28:31
问题 i am trying to write a code to encrypt text using public key and decrypt using private key and passphrase. I am not very good with programming language because i'm not a programming student. But for my mini-project, i need to write some program about encryption. For the below code uses a text file from my c drive to encode using the public key. But i want to use openfiledialog to choose the file instead of directing it manually(not really practical) Really appreciate if anyone can help me

swt/jface中FileDialog的使用

﹥>﹥吖頭↗ 提交于 2020-04-18 06:49:42
在SWT/JFace中,使用文件对话框选择文件。貌似awt和swing应该都提供文件选择对话框,不过之前都没用过。有了自带的文件对话框,就不用可以把更多的时间发在其他功能的实现上了。 下面说说具体的org.eclipse.swt.widgets.FileDialog的使用 选择单个文件 FileDialog dialog = new FileDialog(window.getShell(), SWT.OPEN); dialog.setFilterPath("");// 设置默认的路径 dialog.setText("对话框标题");//设置对话框的标题 dialog.setFileName("");//设置默认的文件名 dialog.setFilterNames(new String[] { "文本文件 (*.txt)", "所有文件(*.*)" });//设置扩展名 dialog.setFilterExtensions(new String[] { "*.txt", "*.*" });//设置文件扩展名 String fileName = dialog.open();// 选择多个文件 FileDialog dialog = new FileDialog(shell,SWT.OPEN|SWT.MULTI); String fileName = dialog.open();/

pyplot.show() reopens old tkinter dialog

[亡魂溺海] 提交于 2020-01-23 08:39:10
问题 EDIT: This seems to be a problem restricted to Tcl/Tk on Mac OS systems. So if you have no experience with that, this topic might be moot... I want to have a Python script that does two things: Ask the user for a file name via a Tkinter file dialog. Plot some data from said file. The problem is, matplotlib uses Tkinter for the graphical representations, and whenever I call pyplot.show() in non-interactive mode, the (before closed) file dialog pops up again. It seems to me like pyplot.show()

using Application.FileDialog to rename a file in VBA

隐身守侯 提交于 2020-01-07 03:54:11
问题 Using VBA. My script moves a file into a directory. If that filename already exists in the target directory, I want the user to be prompted to rename the source file (the one that's being moved) before the move is executed. Because I want the user to know what other files are in the directory already (so they don't choose the name of another file that's already there), my idea is to open a FileDialog box listing the contents of the directory, so that the user can use the FileDialog box's

open a fileDialog in visio vba

試著忘記壹切 提交于 2020-01-05 15:20:06
问题 I'm coding macros in vba Word and on visio 2013. I wanted to open a fileDialog so that the user can choose where to save his file. I succeded in word, but in visio it doesn't to work the same. I wrote this in word: Dim dlg As FileDialog Dim strPath As String 'Boite de dialogue pour choisir où enregistrer son fichier Set dlg = Application.FileDialog(msoFileDialogFolderPicker) With dlg .InitialFileName = Application.ActiveDocument.Path .AllowMultiSelect = False .Title = "Choisir le répertoire d

How do I center a java.awt.FileDialog on the screen

♀尐吖头ヾ 提交于 2020-01-02 08:03:44
问题 I have never been able to figure this one out; the usual suspects don't work. Given: FileDialog dlg=null; dlg=new FileDialog(owner,"Select File to Load",FileDialog.LOAD); dlg.setFile(null); dlg.setVisible(true); is there any way to get that dialog centered? A key point is that at setVisible(), the calling thread is blocked until the dialog is dismissed; and any positioning prior to that seems to be ignored. 回答1: The below solution works for SWT, probably it can do the trick for AWT as well...