|
Usually, you get the #VALUE error if you try to do math on String cell content. Something like =A1+4/"Text" .
|
|
|
|
|
Yes but that isn't whats happening here
|
|
|
|
|
The error you're seeing the cells is saying otherwise...
|
|
|
|
|
All right then, let's explore this.
Is it possible that the calls to Sheet("Parm").Cells(...) is returning the values from the wrong location? I can't see why excel would be confused if I explicitly state the sheet name and cell number, but maybe this is the case.
Or could it be that the parameters being passed are wrong? This function is invoked with: =GLA(A1,B1,C1...) in the relevant spreadsheet. Could excel become confused about where "A1" etc are? I've tried making this "SheetName!A1" etc but to no avail.
Whenever this error occurs I get a thousand rows of #VALUE, but the moment I click in a single one of those cells excel corrects itself.
|
|
|
|
|
Try working with named ranges instead of calculating which cells on the fly, it will enforce which sheets are being referenced.
|
|
|
|
|
Hi all,
I have an Object which I don't know what property it has.
Can I list all the property of that object and later get the value of each property?
TIA
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
use the "Sender.ToString" in any one of the events.
it contains the info abt what the object is.
for eg, if you do this in click event of button1
"msgbox(sender.tostring)"
gives this:
System.Windows.Forms.Button, Text: Button1
TheMrProgrammer
|
|
|
|
|
TheMrProgrammer wrote: use the "Sender.ToString"
I can understand that your answer is restricted to vb.net control object, where the sender exist, but I am talking for object that is not a control.
but, let talk about button control.
I have Button1 as control in my form, how I can do something like this
For each Property in button1.properties<br />
debug.print(Property.Name)<br />
debug.print(Property.Value)<br />
Next<br />
TIA
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
You have to use Reflection to get at the properties. There's a ton of tutorials out there. All you have to do is search for them[^].
|
|
|
|
|
Thank you for your help.
I found what I am searching for.
I did not know that GetType() is reflection.
My problem is still not solved.
I am trying to get the properties in WMI service with no luck. I will continue testing and when I get stuck I will post my question.
Best Regards
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
You never mentioned WMI until now. That changes the question and it's answer immensly. Now, you don't use Reflection to do this. You use the Properties collection of the ManagementObject you're getting back from your WMI query.
For Each prop As PropertyData In wmiObj.Properties
Console.WriteLine("Property Name: " & prop.Name & " Value: " & prop.Value)
Next
|
|
|
|
|
Dave Kreskowiak wrote: You never mentioned WMI until now. That changes the question and it's answer immensly
I feel kinda lost and surprised a little.
Why should I mention that the PEM's is for WMI? is WMI is handled in diff way in vb.net?
I know you are right, since my reflection GetType() does not work with it and I am still trying to work with ManagementObject.
Could you explain please? and is there others kind of object I should take care about?
TIA
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
Getting the properties of a .NET object is very different from a WMI object. The .NET object is a native .NET CLR type, whereas a WMI object is backed by a COM object, not native to the CLR.
|
|
|
|
|
Thank you for your explanation.
To much difference I should take care and learn.
In VFP, there is single "object" that handle all kinds of objects
Although there is an object can be accessed by "object.property", and other cannot be accessed unless you use "For Each"
Thank you very much.
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
hi all
i am using this function in my app
<DllImport("USER32.DLL", EntryPoint:="SetLayeredWindowAttributes", SetLastError:=True, _
CharSet:=CharSet.Unicode, ExactSpelling:=True, _
CallingConvention:=CallingConvention.StdCall)> _
Public Shared Function _
SetLayeredWindowAttributes(ByVal hwnd As Integer, ByVal crKey As Integer, ByVal bAlpha As Byte, ByVal dwFlags As Integer) As Integer _
End Function
but the function is not working.
any guesses abt what is wrong here????
TheMrProgrammer
|
|
|
|
|
|
At a minimum, the hwnd parameter should be declared as an Intptr, not an Integer.
|
|
|
|
|
At first I should ask if it is possible to serealize (nested)classes in VBA Excel?
In order to access the XMLSerialize object in VB.NET you simply add:
Imports System.Xml.Serialization
Imports System.IO 'to write the XML to a file.
But I need this functionality in Excel VBA. I need to add a reference to access the XMLSerialize object.
What reference should I add?
Are there any issues to take into consideration when (de)serializing nested classes (user class containing user types and collections) in VBA or VB.NET?
Thank you in advance
|
|
|
|
|
IIRC, the .NET XML serializer won't work for serializing an Excel or VBA object. It only works on .NET objects.
|
|
|
|
|
AAAAAAAAAAARRRRRRRRRGGGGGGGGHHHHHHHHHH... Damn VBA
Thanks 4 the quick answer Dave.
|
|
|
|
|
|
Does anyone know how to implement Viseme events in Visual Basic 2005? I have the Microsoft SPAI-5.1 DSK for text-to-speech and voice recognition. What I want to do is create an animated face that moves it's mouth as if speaking while it is reading text-to-speech. This is on a Windows XP system, BTW.
I've read that the way to do that is through viseme events, but I have not seen a good example of how to do that, especially in VB.net. I've also read reconflicting information that says that viseme events may only be possible under Windows Vista.
Has any one used viseme events in VB? Or does anyone know a different way I can make an animated charactor sync mouth movements with spoke text-to-speech words?
Thanks For Reading,
-Justin R. Ratliff
weyoun7ster@gmail.com
|
|
|
|
|
You can probably get some ideas from this article[^] and its sample project.
|
|
|
|
|
Hi all,
I was doing some text parsing and I faced the issue below, I would like some one to explain to me from where the 42 is came.
' Add Text1 , at run time, write 123456
' Button Click
Dim _str1 = Me.Text1.ToString
Dim _str2 = Me.Text1.Text.ToString
Debug.Print(_str1.Length) ' Gives 42
Debug.Print(_str2.Length) ' Gives 6
6 is the length of text "123456"
I have Size = 78,20 : Max Length = 32767 : Margin 3,3,3,3 : Location 64,18 : Maximum Size 0,0 : Minimum Size 0,0
what is 42?
TIA
Like car accidents, most hardware problems are due to driver error.
Samir R. Ibrahim
|
|
|
|
|
Me.Text1.ToString uses the ToString method of TextBox (all objects have a ToString method). The ToString method of a TextBox returns its name, something like 'MyApplication.MyNamespace.textBox1'. If you Debug.Print _str1 you will see exactly what it is.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|