Dialog Box Using VB Script - vbscript

Hello I have some knowledge about VB Script, but i need some help so that it will help me to move further and study in VB Script.
I want to make dialog box which will contain :
Two radio button
one Text field to enter some value
OK and CANCEL button
so, could you please help me out?

VBScript doesn't support custom dialogs. You can either use the Internet Explorer COM object to emulate a dialog, or create an HTA. Either way you're building a web page with a form.

Related

How can I closed the property sheet dialog directly with my code?

I am trying closed property sheet dialog directly in my code which created using OleCreatePropertyFrame API. for closing the dialog box I am using PropSheet_PressButton API but i don't know the how to get handle for property sheet dialog.please if anyone know about this suggest me.
It does not really make sense to close a modal dialog if you don't control any of the code inside it.
You control the owner handle so that might be your best option; look for a enabled and visible window owned by your window. Perhaps GetWindow(yourWindow, GW_ENABLEDPOPUP) or GetLastActivePopup. This is slightly hacky of course but what you are doing is not normal.

Export Qlikview report to Excel

I have created a Qlikview report that I would like to export to a Excel spreadsheet. The report has 8 sheets/tabs and navigation functionality on all. After some research I found that I need to create a button on the report that executes a macro.
Having the limited experience in Qlikview as I do, I was only able to go as far as to create the button.
Could anyone please point me in the right direction or better yet, provide me with a macro.
You need to set an action on the button and select external - run macro.
In the macro name field you type the name of your macro function/subroutine (in this case "MacroTest").
By pressing "Edit module..." you can access the macro edit mode (or by pressing Ctrl + M)
sub MacroTest
msgbox("macro")
end sub
Press the button and a message box will appear.
Regarding excel exports there are a lot of working examples you can find by google.
Good luck
//Micke

read/capture Windows pop-up message in vb6?

Problem: Need to read/capture the text of Windows pop-up messages that is generated by non-VB applications.
Situation:
I've a VB6 app, part of which requires processing an excel workbook. A non vb-6 pop-up window (as attached screen) "FILE CONVERSION IN PROGRESS" comes up, while opening an new version of excel-sheet from an old MS Excel app. And automatically it closes alos.
Requirement: I want to capture that pop-up occurance in the code. And then write a conditional statement code for the 'cancel' button click event of that non vb-6 pop-up.
Can anyone suggest something?
You can access other applications with the following APIs:
FindWindow() to locate the main window of what you're looking for
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633499%28v=vs.85%29.aspx
GetWindow() to navigate through the HWNDs of the application so you can get to the button
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633515%28v=vs.85%29.aspx
GetWindowText() to access the text from a control (it cannot be an Edit control)
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633520%28v=vs.85%29.aspx
You'll want to use Spy++ (which can be downloaded) to see what the class name you're looking for when it comes up and to figure out the hierarchy to navigate properly.
You'll need to use the API Text Viewer to get the API declarations so you can use them in VB6 properly.

Update Edit Field with property set by FileBrowse dialog

I have an Edit field that begin's empty. The user uses a button that launches the FileBrowse dialog and allows them to choose a file. This is all working, the file is stored into a property and the functionality is as intended.
However, the Edit Field is not being updated once the user chooses the file. Going forward then back a dialog shows the property in the field, but I can't ask the user to do this. I have read that this is an MSI limitation and was wondering if there are any ways around it.
Essentially I need to "refresh" the dialog, or at least the edit field control after the user chooses their file.
Thanks
This is indeed a limitation from Windows Installer. The only solution to overcome this from an MSI package is to use the twin dialog method.

VBScript - create button in the notepad window

Using VBScript, I want to add an additional button to Notepad labeled “send” . The send button should be located near the help menu in the Notepad window
Please advise if it is possible to add a button inside Notepad. And if it possible then how can I create the button using VBScript?
Note - why I need to add the send button: The purpose of the send button is to send the file opened in Notepad to a remote Linux machine over the network.
This is not possible with VBScript. You could possibly manage to add the button, but you couldn't hook anything to respond to it being clicked.
You could probably hack something together using the native Win32 API, but it's more work to do that than it would be to write your own simple editor in any other language and use it instead of Notepad. (Notepad is simply a thin wrapper around a multiline edit control provided by the Windows API.)
It's Impossible via VBScript but with help of more serious languages like c# or c++ freely:
for example see project of my friend:
http://www.codeproject.com/KB/COM/automatingwindowsapps.aspx

Resources