QFileDialog::getOpenFileName is a static function provided by Qt to show a dialog for opening a file. If a file is selected, this function return the path of the file.
Questions tagged [getopenfilename]
96 questions
0
votes
1 answer
Try and except trouble with practice problem getting error
Using try and except, open animals_shortList.txt for reading and read the file data, creating a new list. Sort the list alphabetically. it would look like this temporary. https://i.stack.imgur.com/A7TE9.jpg
Once the list has been successfully…

Dylan
- 3
- 2
0
votes
1 answer
How to load info from another FILE in python
I want to run something from another file that I created but it is repeating the first part of the code.
Please comment/respond respectfully :)
from replit import clear
from time import sleep
import pickle
playername= input("Enter your username:…

Boi Kane
- 1
- 1
0
votes
1 answer
Getting Runtime Error 1004 using Copy Range method
Description:
What am I trying to do is allow user to select excel file via browse then copy data from Sheet3 in selected file and paste to current workbook Sheet2 (which name is Raw data(STEP 1)).
My problem is that I am getting:
runtime error 1004…

Hilmi
- 43
- 9
0
votes
1 answer
Run-time error 91 Object Variable or With Block not Set
I am getting this error
Run Time Error '91' : Object Variable or With Block not Set.
What I am try to do is let user select files then select sheet3 (which name is Raw data) from selected files then copy to the current workbook
My code is…

Hilmi
- 43
- 9
0
votes
1 answer
C++ win32 App is Freezing after a while i select a file from file dialog?
I am running my Win32 application on Windows 7 32-bit.
I have the following two functions that create a freeze in my application but only when the Internet is available:
HWND mainHwnd;
// When i want to add a file somewhere in the app
_bstr_t…

Vas
- 75
- 9
0
votes
1 answer
Selecting multiple files and loop through all to perform actions based on names
I have wrote a code which has browse dialog to select multiple files and save file names in array and loop them one by one perform action based on keyword in filename.
as it has multi select option, I want to perform specific action based on …

nvbie
- 3
- 1
- 3
0
votes
1 answer
getopenfilename VBA code on Excel2016
I have a VBA script to import txt file. It works well on Excel 2013.
On excel 2016, getopenfilename does not support argument anymore (excel crash). It works when removing all arguments of getopenfilename()
Any idea ?
Sub Import_TXT()
On Error GoTo…
0
votes
1 answer
using getOpenFileName in a handler
I have implemented the getOPenFileName in a handler in qt (in a when_pushbutton_clicked more specifically). How can I save the produced string in a QString in main rather than inside the handler?
0
votes
2 answers
In VBA, my VLOOKUP needs to Update Values
I'm writing a script that requires opening a second workbook and running a VLOOKUP in the second workbook. It works perfectly when the filename of the second workbook is "testlookup.xlsx" but when I changed the filename to "hippity hop…

DukeSilver
- 458
- 1
- 6
- 22
0
votes
1 answer
How to add more documents into Excel file
I want to add more files into my excel file. This macro works if multiselect is false, however if I try it with multiselect = true, I get an error message in row:
if attachment = false then exit sub. An error message was type
mismatch.
Sub…

Martin
- 19
- 5
0
votes
1 answer
Windows API GetOpenFileName with template and hook
I'm trying to use a template with GetOpenFileName without success. I've found very little on this topic in the MSDN or on the web. I've based my attempt on what I saw here
http://visual-c.itags.org/visual-c-c++/77687/
My code follows. The…

Mike D
- 2,753
- 8
- 44
- 77
0
votes
3 answers
C++ LPSTR and string trouble with zero-terminated strings
I'm using GetOpenFileName function from Winapi, and I'm applying filter to the select file dialog.
THIS works perfectly:
LPSTR mfilter = "Filter\0*.PDF\0";
ofn.lpstrFilter = mfilter;
if(GetOpenFileName(&ofn)){
...
THIS fails (dialog opens but no…

ProtectedVoid
- 1,293
- 3
- 17
- 42
0
votes
1 answer
Setting a default path in getOpenFileName (X++)
I was wondering how I can set a default path for a Open File dialog in X++.
The situation is this: In Microsoft Dynamics AX there's the form InventTable, which shows all data concerning our inventory.
On of the properties of every item is an image.…

Teebs
- 171
- 1
- 15
0
votes
4 answers
Winapi GetOpenFileName Extension Filter not working
I'm trying to apply file's extension filters to the file's selection dialog.
This way works:
ofn.lpstrFilter =
"(*.exe) Windows Executable\0*.exe\0"
"(*.ini) Windows Initialization file \0*.ini\0"
"(*.dll) Dynamic Link Library…

ProtectedVoid
- 1,293
- 3
- 17
- 42
0
votes
0 answers
GetOpenFileName API intermittently slow on 2003 server
When running the code below on windows server 2003, there are intermittent slowdowns while GetOpenFileName common dialog initializes. the startup time varies at around ~30 seconds. The code below is a scratch program I made to exemplify the problem…

Trent Torkelson
- 11
- 3