|
Hello,
I am successfully using the following under Excel 2000:
Worksheets("Search_Results").Range("A3:AU310").Clear
Unfortunately, this call fails in Excel 97. The error is 1004.
Also the following line of code fails in 97 and runs perfectly under Excel 2000:
Cells(i, k).Copy Destination:=Worksheets("Search_Results").Cells(m, k)
Please help!
Thank you in advance...
"Needless redundancy is the hobgoblin of software engineering." - Peter Darnell
|
|
|
|
|
I was just wondering how one would programmatically...
1. Eject a CD
2. Transfer data using an IR (Infrared) Port
...using Visual Basic.Net Language. I looked around the site, and couldn't find anything on either of these tasks. Thanks in advance for any help.
|
|
|
|
|
From the platform SDK:
DWORD WINAPI EjectDiskFromSADrive(
LPCWSTR lpComputerName,
LPCWSTR lpAppName,
LPCWSTR lpDeviceName,
HWND hWnd,
LPCWSTR lpTitle,
LPCWSTR lpMessage,
DWORD dwOptions
);
that should eject your CD
There are many ways to access the IR port. If you have the correct drivers, it is a Winsock call, or if you want to access it directly, use the "EscapeCommFunction" calls
pxw
|
|
|
|
|
if we want to eject a flash, what shold we do?
my code is
DWORD ret = 0;
ret = EjectDiskFromSADrive( NULL, NULL, "\ \. \ RemovableDriveI"/*+m_Repository.m_FlashMemoryInf.DriveName*/, NULL, NULL, NULL, NTMS_EJECT_FORCE );
switch(ret)
{
case ERROR_ACCESS_DENIED: printf("NTMS_CONTROL_ACCESS to the library is denied. Other security errors are also possible, but they would indicate a security subsystem error."); break;
case ERROR_DATABASE_FAILURE: printf("The database is inaccessible or damaged."); break;
case ERROR_DATABASE_FULL: printf("The database is full."); break;
case ERROR_DEVICE_NOT_AVAILABLE: printf("The library is disabled."); break;
case ERROR_INVALID_HANDLE: printf("The session ID is invalid or missing."); break;
case ERROR_INVALID_OPERATION: printf("A stop was performed on an invalid operation ID."); break;
case ERROR_INVALID_PARAMETER: printf("A library ID or operation ID pointer is missing."); break;
case ERROR_LIBRARY_OFFLINE: printf("The library ID refers to an offline library that cannot eject media."); break;
case ERROR_MEDIA_NOT_AVAILABLE: printf("The media is disabled."); break;
case ERROR_NOT_ENOUGH_MEMORY: printf("There was an allocation failure during processing."); break;
case ERROR_SUCCESS: printf("The eject operation was successful."); break;
};
but it has always ERROR_INVALID_PARAMETER.
please help me
|
|
|
|
|
Hi,
I am trying to implement an VB GUI application where in when I click a command button "Send" it enables a frame and this frame has some text boxes. The user enters some string in the text box and clicks another command button "ok", which is in the frame. When "ok" is clicked the remaining code in the Send_Click()should continue. I realize I need to use some kind of wait or events, but I am not sure how. If anyone can help me out it'll be great!
thanks,
Shyam
|
|
|
|
|
Why not separate it into 2 methods? The first button will call method 1 , and the second button will call method 2
Nick Seng (the programmer formerly known as Notorious SMC)
God, I pity me! - Phoncible P. Bone
|
|
|
|
|
But then it'll be two unrelated events. When I click the first button it has do some stuff and upon completion the ok button is clicked and control is transfered back.
Shyam
|
|
|
|
|
I'm not sure why you want to do. Can you show some code of the click event?
Nick Seng (the programmer formerly known as Notorious SMC)
God, I pity me! - Phoncible P. Bone
|
|
|
|
|
Can't you show the second form modally?
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Sorry for the late reply, but thanks to everybody who replied. I got it to work according to what Nick said.
Thanks
Blaze
|
|
|
|
|
No Prob. I'm glad you got it to work.
God, I pity me! - Phoncible P. Bone
If I end up Windows ME someone is going to be hurting. - One of the answers to a question for What OS are you
|
|
|
|
|
Anyone know how to order a hashtable in asp.net using vb?
|
|
|
|
|
System.IO does not show up in the refrence dialog box. How do I add a refrence that I can't see?
Or am I way out in left field.....
Gonz
|
|
|
|
|
AFAIK, System.IO is in either the mscorlib or the system Assembly, so it's already added in for you. Just type imports System.IO to use it.
Nick Seng (the programmer formerly known as Notorious SMC)
God, I pity me! - Phoncible P. Bone
|
|
|
|
|
Heres what I want :
1. Find a window based on its title from among the windows open at that
time. (or just get a handle to the active window)
2. Once I locate that window, find a button with certain text in it and
then click that button.
3. It wil be awesome if I can also do the same for certain menus.
The biggest problems : I dont know VB or VC++. If someone has a code snippet to take care of such a problem , please let me know. Which is better for this kind of a problem .. VB or VC++?
Thanks a lot.
|
|
|
|
|
hi,
does anybody know how to install the TCP/IP via VB?
furthermore, i have to know how to set the IP number and anything like this...
Thx
CND
|
|
|
|
|
I got hold of Crystal Reports Developer 8.5. I created a couple of reports with the program. After including them in a project in Visual Basic .NET and trying to open it, I get the following error: "Crystal Dictionary not supported in this version".
Question: Can I import something in VB.NET to recognize the newer version of Crystal Reports?
|
|
|
|
|
I'm working on active scripting (vb-script) support in my application, so my application must support some COM objects. I familliar with COM but relatively new to dispatch interfaces and vb-script. Hence, I'm wondering whether I should expose an interface of a child/sub object via a propery or via a method.
Is there a criteria for using properties / methods?
So for example, should I do this:
Dim module<br />
Set module = modules.module("<name>")
or this:
Dim module<br />
Set module = modules.GetModule("<name>")
|
|
|
|
|
in COM ,, a property is actually a pair of functions
I think you should properties. they make sense..
|
|
|
|
|
Hello,
I want to capture data from a Electronic Weighing Scale attached to RS232 and store in a table on some event say click of GET button.
Any help - API or Code or Lead.
Harinder Hunjan
|
|
|
|
|
there maybe a thread asking how to use Sleep method in .Net.
I know how to declare and use Sleep in VB 6.0, but I don't know how to use it in VB.Net
I create a project in VB 6.0 and convert it back to VB.Net and copy and paste the converted code into my VB.Net project but .. I still get error..
Do I need any special header file to import to use Sleep()?
thanks
|
|
|
|
|
Just use System.Threading.Thread.Sleep().
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Thank you I though it only for thread.. not same as Sleep()
|
|
|
|
|
The Sleep() API does the exact same thing - in fact, System.Threading.Thread.Sleep() just calls the Sleep() API.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
I have been trying to uncover a supported way to view pdf files within my windows form in VB.NET, and I am having no luck. Adobe has an unsupported pdf viewer ocx control which is buggy, and all the other controls I"ve seen are way too expensive to be worth it (my other option is to create a hyperlink and pop up the pdf in Adobe viewer as a modal form). Any ideas out there/cheap viewer controls?
|
|
|
|