|
We are on the right track. This looks promising
Being a newbie, how do I trigger this event or pass info to this sub once Excel has updated.
Many thanks
Jeremy
|
|
|
|
|
The Excel object should fire the events. Make sure the withevents declaration is at the class or module level. Now click on the left dropdown above the code and select the Excel object variable then right dropdown to select the appropriate events.
I have not personally used this but the events should fire. I just don't an event you are needing. You will have to play around with them so see which one will suite your needs.
Michael
|
|
|
|
|
Heya,
I'm having a bit of a problem. I have a XML string which I can read into an XML Document but I can't figure out how to get the data into a DataSet . The dataset is looking for a stream or xmlreader and I'm not a 100% sure on how these work...
Any help would be appreciated thanks
The man who smiles when things go wrong has thought of someone he can blame it on.
If you tell a man there are 300 billion stars in the universe, he'll believe you. But if you tell him a bench has just been painted, he'll have to touch it to be sure.
|
|
|
|
|
This code works for me:
In my app oResultsNode is the document element of an xml document.
Private Function GetResults(ByVal oResultsNode As XmlNode) As DataSet
If Not oResultsNode Is Nothing Then
Dim dsResults As New DataSet
Dim oXmlNodeReader As New XmlNodeReader(oResultsNode)
dsResults.ReadXml(oXmlNodeReader, XmlReadMode.InferSchema)
Return dsResults
End If
End Function
Jim
|
|
|
|
|
Cool thanks, I'll give it a try
The man who smiles when things go wrong has thought of someone he can blame it on.
If you tell a man there are 300 billion stars in the universe, he'll believe you. But if you tell him a bench has just been painted, he'll have to touch it to be sure.
|
|
|
|
|
Dim vReader As New IO.StringReader(vString)
Dim vSet as new DataSet()
vSet.ReadXml(vReader)
Free your mind...
|
|
|
|
|
And here I was trying to get the XmlParserContext, XMLReader and XMLNamespaceManager to all talk to each other... (it eventually worked but my lordy it was NOT pretty)
Thanks man, I'll give it a try now
The man who smiles when things go wrong has thought of someone he can blame it on.
If you tell a man there are 300 billion stars in the universe, he'll believe you. But if you tell him a bench has just been painted, he'll have to touch it to be sure.
|
|
|
|
|
Has anybody done any drawing of custom captions on forms, obviously by subclassing. I'd like to use C#.NET to do this. I did some stuff using other peoples subclassing controls years ago, but never got 100% of what I wanted.
Is there a way to get a Graphics object which represents the entire form surface, including its non-client area? If I could get into a chat or email swap on this subject I'd be really grateful.
If anybody knows of any .NET code that does similar things that would be really useful too.
Nursey
|
|
|
|
|
Hi
I need to know how i can disable pasting in a textbox Using Visual Basic 6.
Greetings
Peter
|
|
|
|
|
Hi,
See my reply in this [^]post
and replace WM_CONTEXTMENU with WM_PASTE
|
|
|
|
|
The constant value for WM_PASTE is 0x302.
RageInTheMachine9532
|
|
|
|
|
Hi,
I have an old VB6 solution where I access a C dll that returns a pointer to a string.
It looks like this:
dim source as long
dim sQuery as string
source = IS_DLL_SendAndReceive(tSendBuf, tSendLen, tResult, tReclen)
sQuery = Space$(1300)
RtlMoveMemory StrPtr(sQuery), source, 2600)
Query = StrConv(sQuery, vbUnicode) 'From ASCII to Unicode
How can I achieve the same result in VB.NET?
I've tried with the Marshal Object and the Encoding class but I can't get it to work
/Jes.
|
|
|
|
|
In VB.6 you can use the generic copy memory routine such as
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
(ByRef Destination As Any, ByRef Source As Any, ByVal numbytes As Long)
VB.Net rejects the Any and won't work.
You have to get more specific, such as
Public Declare Sub CM_Integer_Byte Lib "Kernel32" Alias "RtlMoveMemory" _
(ByRef Destination As Integer, ByRef Source As Byte, ByVal Length AsInteger)
Public Declare Sub CM_Short_Byte Lib "Kernel32" Alias "RtlMoveMemory" _
(ByRef Destination As Short, ByRef Source As Byte, ByVal Length As Integer)
I have a bunch of these in my applications and they work well.
RCarey
RCarey
|
|
|
|
|
Hello and good morning!
Do you know how I can show a picture in a datarow in an seperate column?
I'm using the ComponentOne TrueDBGrid!
Is there a property to fix that problem?
Thomas A
|
|
|
|
|
When you install the truedbgrid component you also have installed some tutorials and samples. Browse to tutorial 11. There you will find the secret chronicals of your desire.
Grtz,
Guus
|
|
|
|
|
Hello everyone,
I am working on a module that involves querying from a .csv file in VB6. The problem that I am facing is with the Date/Time datatype. I have to compare the dates but it is being converted by the driver into text data type when the column is retrieved due to which the comparison cannot be made very accurately.
I want to know if there is some way by means of which I can convert the datatype of the column obtained from the .csv file from text to Date/Time. Something like the toChar function in PL/SQL would be usefull.
I am facing the same data type conversion problem when I tried to import the data into an Access table and tried to query it.
Please send a response to this as early as possible.
I need it urgently.
Thanks
Sathya
|
|
|
|
|
Try using CDate() to convert text to a date data type.
Dim t As String
Dim d As Date
t = "January 23, 2004 7:45 AM"
d = CDate(t)
MsgBox d
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
Hi friends, Can any body tell me that how can I disable some rows in the datagrid. The exact requirement is that in the datatable I have 5 rows (For example) and it has 2 columns. One of those columns is boolean. And all those rows will be disabled who has that boolean value true. Waiting for ur replies.
Shoaib Danish
|
|
|
|
|
How can i get a list of active machines using active directory services & vb.net?
|
|
|
|
|
You can get the list of machines that are both in the Directory and logged into Active Directory using the methods described here[^].
There is an introduction to using the Active Directory objects in VB here[^].
RageInTheMachine9532
|
|
|
|
|
I am attempting to write a script using ms ie as an object, and controlling a sequence of interactions with the site without having to physically move the mouse around and click and type into message boxes or select boxes. This is all from the client side, of course.
So far, I have code that will alow me to open an explorer window at the selected http site and click on any button I want to. But I have not found a way to enter text, or select from a list box.
Does anyone here know how to do this? I am beginning to think that it is not even possible after searching for hours on the net.
Is there a way to simulate key presses?
Where can I find a complete referance to the ie procedures?
Russ
|
|
|
|
|
When you tell the IE Object to Navigate to a web page, it will fire a DocumentComplete (I Think!) event to let you know that the enitre page has been retrieved. In your event handler, you can get a reference to the Document using something like this:
Dim objDocument as Document
Set objDocument = objIEBrowser.Document
(Someone feel free to correct me if I'm wrong!)
From there, you can use the Document object to find the control that you want in its Elements collection. You can then modify the text you want, then you call the Click method of the submit button, which you will also find in the Elements collection somewhere.
You can find the complete document on the Document object model here[^].
RageInTheMachine9532
|
|
|
|
|
hi friends,
can anyone please tell me that how can i terminate a specific any application and all their instances, say all the open windows of Internet Explorer, from a program in VB6.
Thanx
I Think, Therefore I am
|
|
|
|
|
I think what your looking for is here[^]. We warned, it's not as easy as it would sound. There are a few pitfalls to consider when forcing an app to close.
RageInTheMachine9532
|
|
|
|
|
Hi,
i should use a Component in VBScript or JScript that has a Function with an out parameter.
in VB I can use the Component like this:
Dim myComponent As Component<br />
Set myComponent = New Component<br />
Dim res As Long<br />
Call myComponent.MyFunction(res, "some String", 1, 2, "another Text")<br />
If res <> 0 Then MsgBox ("Error while executing MyFunction")
how can I write the VBScript of JScript code that the res variable is passed by reference and not by value, so i can check the value afterwards?
Greets
Roland
|
|
|
|