|
Thank you!
Ah, a blonde moment of note!
This one will definatly go down in the books a silly moment for me, hopefully this helps someone else
Thanks again.
- Artificial intelligence is no match for natural stupidity
|
|
|
|
|
It should also be mentioned that your syntax might be a bit off:
Friend Class Class2
Dim _myVariable As String
Dim THISDOESNTWORK as New Class1
Public Property myVariable()as string
Get
Return THISDOESNTWORK._message
End Get
Set(ByVal value as string)
THISDOESNTWORK._message = value
End Set
End Property
End Class
or
Friend Class Class2
Dim _myVariable As String
Dim THISDOESNTWORK as New Class1
Public Property myVariable() as Class1
Get
Return THISDOESNTWORK
End Get
Set(ByVal value as Class 1)
THISDOESNTWORK= value
End Set
End Property
End Class
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
I have web-pages & MS Access database in my web-host (http://www....), is there easy way to use VB.net to access it without using FTP?
If possible, please provide valid links or sample codes.
Thanks
|
|
|
|
|
where is the access file in relationship to your vb.net code? why does ftp come into play?
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Please see the comments on Can I use VB.net and XML to read/write a MS access database in the web-site? about 2 pages after this page.
I post 2 questions because the first one I mentioned about using XML ... but what I try to find out which is the best way to write/read MS Access database in my Web-host! How do you think?
|
|
|
|
|
I need to find out how to do the following:
I have a script to do this
Ask User for a variable
Create a NEW sheet with the variable name
I am able to do some of the above however I need to incorporate some error checking to prevent the script failing. wats the best course of action
hope this makes sense to someone
|
|
|
|
|
Is this a question about VB scripting in MS Excel?
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
|
Ok - I guess you need to check for 2 things:
1) Check that the user input is valid (not blank, doesnt contain invalid characters...)
2) Check that the name specified does not already exist as another sheet in the workbook where you want to attempt to create the new sheet (Check the Workbook.Sheets collection)
HTH
|
|
|
|
|
I used somethng like this recently.
In my case I wanted a new sheet consisting only of data of a particular Suppliers account.
But you can see the basis of it and adapt as per necessary.
'request supplier
Dim RequestedSupplier As String
RequestedSupplier = Application.InputBox("Enter Supplier Code", "Supplier Selection", , , , , , 2)
If RequestedSupplier = "" Then End
'UPPER CASE the RESULT
RequestedSupplier = UCase(RequestedSupplier)
'confirm supplier
MsgBox ("You have Selected : " & RequestedSupplier)
'create page
'creates ActNm - Active Sheet name
Dim ActNm As String
With ActiveWorkbook.Sheets
.Add after:=Worksheets(Worksheets.Count)
End With
ActNm = ActiveSheet.Name
On Error Resume Next
ActiveSheet.Name = RequestedSupplier
NoName: If Err.Number = 1004 Then ActiveSheet.Name = InputBox("Enter name for New Sheet")
If ActiveSheet.Name = ActNm Then GoTo NoName
On Error GoTo 0
Hope this helps
------------------------------------
"I'd rather have a bottle in front of me than a frontal lobotomy" - Bob Monkhouse
|
|
|
|
|
Hi,
Please help me to create pdf file from crystal reports with sub reports and parameters?
Thanks,
Deepa
|
|
|
|
|
Hi group,
we have a UserControl "UserCtrlWithDataGridView" containing a DataGridView
(and other controls such as labels ...)
To be able to set properties of the DataGridView (or other contained controls) in the designer of the form where the UserControl is placed, we defined a
public property for the component, e.g. "Public ReadOnly Property XDataGridView() As DataGridView".
With the following attribute "DesignerSerializationVisibility..." (see code below) we make sure, that the property values are persistant, that means they are automatically entered into the form.designer.vb code.
This works fine in case of a label and also for properties such as "Dock" for the DataGridView.
But if we try to add columns to the "XDataGridView" in the designer by clicking on "..." of the property "columns", the following error appears:
"Object reference not set to an instance of an object"
How can it be solved?
Michael
Public Class UserCtrlWithDataGridView
< _
System.ComponentModel.Localizable(False), _
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content) _
> _
Public ReadOnly Property XDataGridView() As DataGridView
Get
Return Me.DataGridView1
End Get
End Property
End Class
|
|
|
|
|
Hi,
I have a function with a parameter and when I call the function I want the parameter to be set properties or set values so that the function does the appropriate action within a select case, but dont want incorrect parameters to be passed lets say:
Public Function Test(ByVal strSetValue as string) as Integer
Select Case strSetValue
Case "Test1"
'do something
Case "Test2"
'do something
Case "Test3"
'do something
End Select
Return Test
End Function
In other words, when you call the function name and put in the first open bracket, I would like a intelisense listbox to appear where you can select the appropriate value...
any advice will be appreciated
|
|
|
|
|
Use an enum as the parameter.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
|
You may always want to add a default: to your switch that throws an exception, in case one day a new value is passed in and not acted on. I do that with all switch statements where I expect every value passed in to do something. This would also work with the string approach, but enums are a lot better, not least for intellisense and to avoid typos.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
do you have an example of the switch?
thanks for your info so far
|
|
|
|
|
Switch is nothing but Select
|
|
|
|
|
i have files uploaded to server now i have one more window in which i have to open the files from server. how to impliment same in vb.net (windows). plz help.
|
|
|
|
|
Please try and explain what you are trying to do a little more explicitly. Preferably using punctuation.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
hello
i upload files from a window using button control. the files i upload are scanned bills. now to check the bills, i created one more form, in which i need to download the bills from server, that i uploaded previously.
how to do that.
it is just like attachments in windows Outlook that are opened in their respective applications upon clicking on them.
|
|
|
|
|
I assume then they are images of some kind, so you just need to open them in a PictureBox control.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
i know i can use imagebox but i want to do it differently. like i take it for file can be any type file. that is what i need to know how to do it.
|
|
|
|
|
read the folder first and check how many files are there
and loop through each and every file reading its suffix ie .jpg or .png
and store the filename in some sort of variable and pass it to any function ... do whatever you want to do with that file in that function.
|
|
|
|
|
thanx i ll try it but please find a solution if i can't
|
|
|
|