|
In Excel 2007, you need to first display the Developer Ribbon from the Excel Options | Popular panel.
Then on the Developer Ribbon, Insert Control | ActiveX Combo (Form Control Combo will be disabled)
As Dave has already stated, the control sits on top of the sheet, and is not 'inside' a cell. They just happen to move relative to the cells where you placed them (by default), if you insert and delete / resize cells. You can change the move/resize action from the objects properties though.
|
|
|
|
|
Thank you!I understand now.
|
|
|
|
|
I am trying to look through a database and checked items in a checkedlistbox based on a Contact ID number. The error I'm receiving is this : Public member 'item' on type 'String' not found.
The error is on this line of code: "If lstDebtState.Items.Item(x).item(0) = dt2.Rows(j).Item(0) Then"
Here is my code:
Try
con.Open()
Dim sql As String
sql = "Select Contact_ID from Contacts where Company = '" & company & "'"
cmd = New OleDb.OleDbCommand(sql, con)
Dim dr As OleDb.OleDbDataReader
dr = cmd.ExecuteReader
Dim Contact_ID As Integer
While dr.Read()
Contact_ID = dr.GetInt32(0)
End While
Dim da As New OleDb.OleDbDataAdapter("SELECT * FROM Contacts WHERE Company = '" & company & "'", con)
Dim da2 As New OleDb.OleDbDataAdapter("SELECT * FROM Contact_Locn WHERE Contact_ID = " & Contact_ID & "", con)
Dim ds As New DataSet
Dim ds2 As New DataSet
da.Fill(ds, "Contacts")
da2.Fill(ds2, "Contact_Locn")
Dim x
Dim j
Dim dt As DataTable = ds.Tables("Contacts")
Dim dt2 As DataTable = ds2.Tables("Contact_Locn")
For x = 0 To Me.lstDebtState.Items.Count - 1
For j = 0 To dt2.Rows.Count - 1
If lstDebtState.Items.Item(x).item(0) = dt2.Rows(j).Item(0) Then
lstDebtState.SetItemChecked(x, true)
End If
Next
Next
txtcompadd.Text = dt.Rows(0)("Company")
txtaddressadd.Text = dt.Rows(0)("Address")
txtCityAdd.Text = dt.Rows(0)("City")
cbStateadd.Text = dt.Rows(0)("State")
txtZipAdd.Text = dt.Rows(0)("ZipCode")
cbCountryAdd.Text = dt.Rows(0)("Country")
txtFname.Text = dt.Rows(0)("Fname")
txtLName.Text = dt.Rows(0)("Lname")
txtOffice.Text = dt.Rows(0)("OfficePhone")
txtCell.Text = dt.Rows(0)("CellPhone")
txtAssistant.Text = dt.Rows(0)("AssistantPhone")
txtTitleadd.Text = dt.Rows(0)("Title")
txtEmailAdd.Text = dt.Rows(0)("Email")
txtWebAdd.Text = dt.Rows(0)("Website")
txtFaxAdd.Text = dt.Rows(0)("Fax")
cbdebt.Checked = dt.Rows(0)("Debt")
cbequity.Checked = dt.Rows(0)("Equity")
cbmezzanine.Checked = dt.Rows(0)("Mezzanine")
cbcredit.Checked = dt.Rows(0)("CreditEnhancement")
Catch ex As Exception
MsgBox(ex.Message)
Finally
con.Close()
End Try
End Sub
|
|
|
|
|
Jesse32 wrote: lstDebtState.Items.Item(x).item(0)
Have you got 1 too many .item on this line? doesn't look right.
.item(x) is possibly returning an object of type string, hence the error.
|
|
|
|
|
OK, just look at the line again. Are you sure you want the sub-item of a sub-item of a CheckedListBox Item? You probably want to take one of those items collections out of that line.
|
|
|
|
|
Hi, dear all,
Sorry I am new about this issue, so maybe my question sounds silly.
We have a project created years ago. When user first time access this application, it will ask user to request registration code from customer support, after get the license by email the user register in a dialog box then can use the application. The whole process is completely working fine.
Now I will create a new project based on this existing project, just a little change (logo, some text, title...) and then this project will be used by other system, I want the new project have the same authrization process as the existing one, exactly same logic. So I need to change application name and encryption key to make it different from the existing one.
What should I do to achieve my aim?
Can I just assign my new application a new unique name and a random generated encryption key in programming? Do I need to inform customer support my new application so they can generate registration code for it from user's request?
Any reply is welcome.
|
|
|
|
|
I don't think anyboday can answer this for you without knowing how the license checking is done in the original application.
I assume you have access to the original code, so you will have to go through it to see if the licensing is based on any 3rd part components or special algoritms. When you know that, then you MIGHT be able to adapt it to your new application.
Good luck
|
|
|
|
|
John,
Thanks for your reply.
So everything depends on how the original project handle this case, right?
I thought there were some standard procedures to achieve this, I am wrong.
Thanks!
|
|
|
|
|
Hi everyone,
Is there a way to include all the referenced libraries in a vb.net excutable using visual studio? I'm trying to make the code portable to other Windows machines that may not have .net framework installed. I know this can be done with c++ in visual studio.
Thanks!
|
|
|
|
|
No, if an app needs .NET you need to install .NET first.
(The one exception is verrrrrrrrrrrrrrrrrrrrry expensive).
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
|
I think you're talking about compiling the .EXE and merging all the assemblies into the resulting .EXE. You cannot do that using the standard Visual Studio and .NET Framework SDK toolset. There are third party tools out there that can do it, but none of them are free and they all cost considerable money.
Salamander[^].
Thinstall was replaced with VMWare's ThinApp[^].
XenoCode Virtual Application Studio[^]
...among others... You're looking at spending at least $1,200.00 on these things.
|
|
|
|
|
hi all
in my project i have a task with Ms word application
i have to open the already existing word document and
i have to pass the values to the bookmarks in that document
i written the following code
Dim wordapp As New Word.Application
wordapp = Nothing
wordapp = CreateObject("word.application")
Dim olddoc As Word.Document
olddoc = wordapp.Documents.Open(AppPath + "Designs\Gantry2.doc")
'book marks
For i As Integer = 0 To 48
With wordapp.ActiveDocument
.Bookmarks.Item("b" + i.ToString()).Range.Text = DG_GanDict.Item("b" + i.ToString())
End With
Next
wordapp.ActiveDocument.SaveAs("test.doc")
wordapp.Visible = True
the above code works in Ms office 2003
but the same code does not works or executes in ms office 2007
even though i added the refernce
when i run it in ms office 2007
i get Runtime.InteropServices.COMException
This file could not be found.
(C:\//Program%20Files/VCS/...)
and ErrorCode = -2146823114
that to it happens in c:\ drive only
when i copy and paste the application in other drive like D:\
it executes properly
can any one have a idea about this problem
and is there any common code which runs in ms office 2003 and 2007 versions
thanks in advance
vijay kumar d
|
|
|
|
|
One problem may be the use of CreateObject.
vijaylumar wrote: Dim wordapp As New Word.Application
wordapp = Nothing
wordapp = CreateObject("word.application")
You got an instance of the Word Application object already so why ditch it and attemt to recreate it in the old VB6 style?
As for 2003/2007 execution, I don't see any 2007 specific code here. Target the 2003 interop assemblies, make sure you include them in your deployment, and it will work fine against 2007 as well. In fact I just installed Office 2010 and the 2003 Interop Assemblies still work against 2010!
|
|
|
|
|
how can i bound textbox control for numeric value only
|
|
|
|
|
Stop double posting, it is rude
My advice is free, and you may get what you paid for.
|
|
|
|
|
You cant.
There is a reason it is called a TextBox, it is for text.
If you want the input to be treated as a number you have to put exceptions on to check that a number has been entered and then parse the resultant input to INT (or whatever).
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
Create you're own version of a textbox that only accept's number keys and those required for editing values.
No, i don't have "exact code" to give you. You're not the first person to try and do this. There are thousands of example of how to do this on the web.
|
|
|
|
|
|
THanks alot THE CODE PROJECT TEAM
|
|
|
|
|
Look, reply to the previous post. STOP CREATING NEW THREADS EVERY TIME YOU WANT TO RESPOND TO THE PREVIOUS POST!
The code that was given to you was "accurate" every time. It may have required a little tweaking to fit your code exactly, but that's what you get paid to do, correct? You know, write code...
|
|
|
|
|
Dave Kreskowiak wrote: but that's what you get paid to do, correct? You know, write code...
apparently not. He gets paid to spam boards under the impression that it's a dedicated team that will do all his work for him.
|
|
|
|
|
what do you mean? you're not dedicated??
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
i want msgbox if i press enter key on textbox control
|
|
|
|
|
You are unbelievable here;
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.Enter Then
MsgBox(TextBox1.Text)
End If
End Sub
|
|
|
|