Have a column of dates which i need to compare to a specific time of the year, which establishes what calculation needs to be applyed then depending on the outcome apply conditional formating to highlight an adjcent cell, but need to remove the YY element as the contents spans multiple years.
if the date in A1 is between 1st Jan & 14th Mar use -8 if the date in A1 is between 15th Mar & 15th Oct use -17 if the date in A1 is between 16th Oct & 31st Dec use -8
Then deduct the above value from B1 to give a target for each row (from 3 onwards)if the target is < the value in n then change background orange in f
2 Listboxes gives values to listbox3 like "listbox1item:listbox2item"When I export it to txt file and open in notepad, it shows listbox1item:listbox2item listbox1item:listbox2item listbox1item:listbox2item but when I open same file on wordpad and other text editors it shows like
I am using the DateTimePicker control in a Vb.Net Windows project.I would like the date to reflect the Regional Settings on the user's computer, but also to show the month name, rather than the month number.For example, if my computer is set to English(US), I would like to see Nov 26 2009, and if my computer is set to English (NZ), I would like to see 26 Nov 2009Is this possible?
I have a datagridview and need to do some formatting to it. On load the row 0 column 0 cell is highlighted. I need users to click on datagridview to select a value. The issue is with the initial load highlight it looks like the first row is already selected when in fact it is now. How can this highlight be disabled? Each row of has 7 cell, the user is able to select any of the cell of a row and the corresponding row ID is selected. The issue is that only that one cell is highlighted.
I would like the entire row highlighted regardless of what cell in that row is clicked on. One of the columns is a status value. I would like to color the text based on the value. For example if the Status is opened I want the text to be red, if the status is closed the text color should be default.
I am working in VB.Net and trying to use Regex.Replace to format a string I am using to query Sql. What Im going for is to cut out comments "--". I've found that in most cases the below works for what I need.
I'm entering 123 into a field and getting 231.It's because I'm formating the text as I change it.
Private Sub txtObject_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtObject.TextChanged txtObject.Text = Format(Val(txtObject.Text), Zformat) End Sub zformat is "0.0"
Initially the field is "0.0". If I highlight it and type "1" I get "1.0" the cursor is now in front of the "1",I then type "2" and get "21.0" and the cursor is in front of the "1",I then type "3" and get "231.0".
It is because the cursor is in the "wrong" position.Is there a simple way to fix this?
Have a bit of code ported from VB6 to VB.NET. It uses Write and WriteLine all the way to produce output files.
Now, I need to compare outputs from original and ported code, but there's one tiny problem with number formatting. For instance whereas VB6 code Writes just .5, the VB.NET code produces 0.5, instead of .0005 (in original) it writes 5E-4, etc.
How can I make VB.NET's Write to write numbers in the same format as VB6? The option of refactoring writing code to include formatting step is not acceptable.
I have an access database that is populating a txtbox field on my form..How do I get those results to be currency?do I add code to the form? or do I add code to the function of the tbl? [code]I dont know which side to code or what to code to get the results to be formated as curency
I Have a RTF File which i have exported from CrystalReportviewer Now i want to assign the exported RTF to a RichTextBox[code]..
The File is Loaded successfully.. But i m loosing the Formatting , i mean to say When i m opening the Same RTF Outside of the application its Showing the Format As it was in Report ... But While i m Attaching it to Application It looses all the formatting .
This is my second post and today I have the following problem:I want to make a Steam Gamertag Maker ..
1) I have a RichTextBox.
2) I have 8 buttons each representing a color (red, green, yellow, blue, teal, pink, white and black ..)
3.1) I enter some text into the richtext box.
3.2) I select part of the text.
3.3) When I press a button, e.g Blue and the selected text changes to that color.
3.5) I have a copy button, that copies the content of the richtextbox .. and that is where the problem starts .. (The copied text has no color and so on .
4) If I press, for example the Blue Button, I want that the following text "^4", is written just in front of the selected text and that the selected text is colored blue at the same time. The other text should not be affected by those adjustments ..
5) If the "^4" is inserted, it should be hidden
6) If everything is colored, I press the copy button and it should copy the whole text, including for example the "^4" ..
7) I want the "^4" to be hidden, because it looks better, but if I copy the content of the RichText box it should be included ..
I got an email I just created using Outlook automation and I need some help to get it formated nicely:set Font of the body set font-style to bold of certain words insert a picture into the body (this is not an attachment) when putting text in the body using VB.net looks like outlook automatically adds spaces for each "paragraph", how can I get rid of these spaces? how can I get my signature on because it disappears when text is added to the body [Code]
I did a clean install and tried to get the project running again. The code ... AlteredDate = SelectedDay & "/" & SelectedMonth & "/" & SelectedYear would always work defaulting to DD/MM/YYYY before the clean install. The program now runs an error "Conversion from string "13/8/2009" to type Date is not valid.. How do I change the default back to DD MM YYYY or format it to that?
it gives me error as "String was not recognized as a valid DateTime."
so then i modify above code as -- CDate("28/01/2011").it gives me error as "Cast from string "28/01/2011" to type 'Date' is not valid." I used convert.todatetime also date.parseexact but nothing is working..
I have issues with inserting date into my database. Though i declare the datatype as datetime in my SQL server database. the error message is " Conversion failed when converting datetime from character string "
I get this error when I run the application Incorrect syntax near 12, on debugging I found that this error is caused due to the # along with the date. Dim backdate as datetime backdate = DateTime.Now.AddDays(-1)
on binding the data to the grid to filter the backdate records this error is caused Incorrect syntax near 12.
myqry = " select SRNO,SUBJECT,ID where datesend =" backdate Now i am trying to extract only the date or shall I divide the date into day , month and year with DATEPART and take into a variable or convert the date or what should i do
I get this error when i try to drag a record from a file;
Private Sub cboBookingID_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboBookingID.Click Me.cboBookingID.Items.Clear() 'output all records method 1 NumberOfRecords = LOF(4) / Len(OneBooking)
The bit in bold is where the error crashes at. it because i used this code for like 5 other files and worked perfectly fine.
I am trying to bind an Access database to a MSChart control in VB Net 2008. I have a test database populated with four fields SAMPLE-DateTime, Values-Number, MAX-Number and MIN-Number. I'd like to only display the rows that fall within a specific date range but I'm running into a problem when i try to execute the following command:
cmd = "SELECT SAMPLE,VALUES,MAX,MIN FROM TABLE1 WHERE [CHECK_DATE] BETWEEN 01/01/2009 AND 01/01/2011"