|
Hi,
I would like to know how can convert a string to integer with VBA
thx
|
|
|
|
|
i don't know VBA, but in VB.NET, you use Integer.Parse() or CInt()
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
VBA supports most of VBScript's built-in functions.
In this case I think you want CInt()
|
|
|
|
|
intValue = val(stringValue)
this val will not only convert string into integer but also covers the exceptions like the string is blank then it will make it 0.
|
|
|
|
|
I want to add a button control on winform by code.
How to do ?
Thanks!
|
|
|
|
|
pasts a control on your form. then go to the code and check the code which is generated. now same type of code can be written by you on any button click or any other event.
|
|
|
|
|
Dim myButton As New Button
myButton.Name = "whatEver"
myButton.Text = "Button Text"
myButton.Location = new Point(whatever, whatever)
myButton.Size = new Size(whatever, whatever)
AddHandler myButton.Click, AddressOf myButtonClickHandler
Me.Controls.Add(myButton)
.
.
.
Private Sub myButtonClickHandler(ByVal sender As Object, ByVal e As System.EventArgs)
' button click handler code goes here.
End Sub
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm working on a application in vb.net and I need to get the name (not the text) of the menus and submenus in running mode.
Please help me!
Luismi
|
|
|
|
|
How to parse xml which has several level?
For example,
<Root>
<A>
<B>b</B>
<C>c</C>
</A>
</Root>
Thanks!
|
|
|
|
|
You might want to read your own post to see what it actually looks like.
Next time, check the box labeled "Do not treat <'s as HTML tags" if your going to post XML data.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for the alert.
I have changed the text.
You could see the XML content.
|
|
|
|
|
OK. What do you my parse? I'm assuming you want to pull the values out of the tags. Take a look at this[^] article by Pratik Desai for some ideas.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How to find default sorted column of dataset in datagrid. like I have one dataset with fields of ( Select id, date, name from xyz order by name)
how can i find that order on which coloumn?. i am using OLEDB
|
|
|
|
|
The shellexecute function could not be used in vb.net 2005.
How to run other programs in a vb.net applicaton?
Thanks!
|
|
|
|
|
Create a ProcessStartInfo object and configure it with the executable name, any command line parameters, etc. Then start the process using a Process object.
Dim si As New ProcessStartInfo
'COnfigure si properties to define process to run
Dim p As Process = Process.Start(si)
|
|
|
|
|
Hello all i am in need for someone to plase point out to me why my drop down list do not rebind after the first databind,
Page loads fine, click on ddlA every thing loads fine in eaither ddlB or ddlc, it's when i reclick or try to set some ~.visiable= false THEN
Can someone please tell me where i am going work or send me a url so that i can read up on this issue..
Thank you,
Ahead of time,
.............code........................................
Option Strict On
Public Class Wood_Blind_Extras_Main
Inherits System.Web.UI.UserControl
Dim IDA_TapCor As Int32
Dim IDProduct As Int32
Dim IDA_Remote As Int32
'
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'
hdnProductID.Value = Request.QueryString("IDProduct")
hdnIDA_TapCor.Value = Request.QueryString("IDA_TapCor")
hdnIDA_Remote.Value = Request.QueryString("IDA_Remote")
'
ddlClothTapeColors.Visible = False
ddlBlindRemote.Visible = False
If Page.IsPostBack Then
If ddlClothTapeColors.Visible = True Then
ddlBlindRemote.Visible = False
Else
ddlBlindRemote.Visible = True
ddlClothTapeColors.Visible = False
End If
End If
End Sub
'...
Private Sub ddlMainOptions_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ddlMainOptions.SelectedIndexChanged
'
'...
Try
'
Select Case ddlMainOptions.SelectedItem.Value
'
Case "ClothTape"
ddlMainOptions.SelectedItem.Value = hdnIDA_TapCor.Value
IDA_TapCor = CInt(ddlMainOptions.SelectedItem.Value)
ddlClothTapeColors.Visible = True
GetTapeColors()
Case "Remote"
ddlMainOptions.SelectedItem.Value = hdnIDA_Remote.Value
IDA_Remote = CInt(ddlMainOptions.SelectedItem.Value)
ddlBlindRemote.Visible = True
GetRemote()
Case "Motorization"
ddlMainOptions.SelectedItem.Value = ""
Case "Routless"
ddlMainOptions.SelectedItem.Value = ""
Case "Extras"
Case Else
End Select
'
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message & ": " & ex.StackTrace)
End Try
End Sub
'
Private Sub GetTapeColors() ' ClothTape colors for Wood and Alternitive Blinds
'
Try
IDProduct = CInt(hdnProductID.Value)
'
Dim ClothTapeColors As New ConstructionSuperCenter.BCom_NS.Wood_and_Alternitive_Blinds_MAIN
'Get Fabric Colors For DDL
ddlClothTapeColors.DataSource = ClothTapeColors.Get_Standard_Blind_Cloth_Tape_Colors_(IDProduct, IDA_TapCor)
ddlClothTapeColors.ToolTip = "Please Choose a Cloth Color"
ddlClothTapeColors.DataTextField = "AttributeName"
ddlClothTapeColors.DataValueField = "AttributeName"
ddlClothTapeColors.DataBind()
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message & ": " & ex.StackTrace)
End Try
End Sub
'
Private Sub GetRemote() 'Get Lets the consumer know if there is a remote for this product
'
Try
IDProduct = CInt(hdnProductID.Value)
'
Dim BlindRemote As New ConstructionSuperCenter.BCom_NS.Wood_and_Alternitive_Blinds_MAIN
'Get blind remote option for DDL
ddlBlindRemote.DataSource = BlindRemote.Get_Standard_Blind_Remote_(IDProduct, IDA_Remote)
ddlBlindRemote.ToolTip = "Remote Option"
ddlBlindRemote.DataTextField = "AttributeName"
ddlBlindRemote.DataValueField = "AttributeName"
ddlBlindRemote.DataBind()
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message & ": " & ex.StackTrace)
End Try
End Sub
'
End Class
...........................html..............................................
<asp:dropdownlist id="ddlMainOptions" autopostback="True" runat="server">
<asp:listitem value="Extras">-- Extras --
<asp:listitem value="ClothTape">Cloth Tape
<asp:listitem value="Remote">-- Remote --
<asp:listitem value="Motorization">-- Motorization --
<asp:listitem value="Routless ">-- Routless --
| <asp:placeholder id="phExtras" runat="server"> | <asp:dropdownlist id="ddlClothTapeColors" autopostback="True" runat="server" height="40px"><asp:dropdownlist id="ddlBlindRemote" runat="server" autopostback="True"> | <asp:datalist id="dlFabricTape" runat="server" height="168px" width="8px">
<itemtemplate>
<selecteditemtemplate>
| | |
|
|
|
|
|
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'
hdnProductID.Value = Request.QueryString("IDProduct")
hdnIDA_TapCor.Value = Request.QueryString("IDA_TapCor")
hdnIDA_Remote.Value = Request.QueryString("IDA_Remote")
'
ddlClothTapeColors.Visible = False
ddlBlindRemote.Visible = False
If Page.IsPostBack Then
If ddlClothTapeColors.Visible = True Then
ddlBlindRemote.Visible = False
Else
ddlBlindRemote.Visible = True
ddlClothTapeColors.Visible = False
End If
End If
End Sub
For starters ->
If ddlClothTapeColors.Visible = True Then - can't happen, you just set it to false
So, ddlBlindRemote will ALWAYS be visible.
I suspect that when something is invisible, it's not rendered, which means your view state is lost as well.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi guys.
Just a question, what command do I use to make my VB.net program to extract a value from the windows registry as well as to input something new into the windows registry? Thanz for your time...
|
|
|
|
|
I think this [^] can help you. It's C# (basically the same).
<italic>Work hard, Work effectively.
|
|
|
|
|
|
U didn't look carefully. Try this[^].
<italic>Work hard, Work effectively.
|
|
|
|
|
@(o.o)@
Dang, that is deep... Will try to figure it out now... thanz man... Appreciate u helping me out by giving those links...
|
|
|
|
|
Tried the link u gave me... it doesn't recognise the registrykey part..
|
|
|
|
|
icowa wrote:
it doesn't recognise the registrykey part
What doesn't recognise the registrykey part?
<italic>Work hard, Work effectively.
|
|
|
|
|
my VB.net in Visual Studio .net 2003. it doesn't seem to recognise the registrykey command because it would put wavy blue lines under it..
|
|
|
|