User Profile
Collapse
-
How do I change backcolor of textbox based on the value inside it?
Lets see if I can explain-
I have a text box (rich text box) in a form. Inside the box, some data gets put in there- specifically insurance information.
Normally, the box doesn't need to change color to alert the user there's a problem with the text that's inside, because the information is usually good.
But there are a few phrases that need to alert the user there's a problem.
For example,... -
A generic error occurred in GDI+. while saving
So here's the problem-
My app has an image in it in a picture box. I need the end user to be able to change it. So the code I added below should do that. However, I get the "A generic error occurred in GDI+. while saving"
I understand it as this- possibly an error saving it to C:\?? Because when I save it to a folder such as MyPictures or Pictures it saves A-ok.
Does anyone have a solution? It... -
Here's the code-
...Code:'// Start a new workbook from a template in Excel. Dim oExcel As Object = CreateObject("Excel.Application") If File.Exists(myDailyLogXlsxFile) Then '//----- check if file exists. '//------ Open the log template Dim oBook As Object = oExcel.Workbooks.Open(myDailyLogXlsxFile) '// Add data to cells ofLeave a comment:
-
Need fresh perspectives on saving Excel in VB2010
Ok, here's what I've got.
I have a form that exports to an Excel worksheet (sheet1) and it works great, no issues there or anything. It's not a template, just a regular .xlsx spreadsheet, but I use it as my template.
Now, the goal is for the end user to be able to fill out the form, and save it as todays date. How does it get todays date? In the Excel sheet, N2 is todays date, and it gets it from the form. Then save... -
Print Preview Excel Template with VB 2010
*sigh*
I can't get this to work. My program fills all the values into an Excel spreadsheet- no problems there. What I'd like to do is a print preview/print function. I can't seem to get my code right, all I get are blank pages in the print preview box.
...Code:Dim oExcel As Object = CreateObject("Excel.Application") oExcel.Workbooks.Open("C:\DailyLogs\DailyLog.xlsx") -
Sorry, I should have mentioned I'm using VB 2010. I tried that code and it gave a ton of errors. I've played around with some variations and nothing worked.Leave a comment:
-
How do I use tab to auto fill a textbox?
Ok, here's what I've got.
In the screenshot, you'll see three things- a start time, end time and total time. So the goal is this-
A user puts in a current start time by hitting F1 at the start of shift. They tab across the end time to the "time field", then go across the row.
Then they enter their case number, then hit F1 again, and it will enter the current time in the start box on the next row,... -
I got it!
Change line 10 of code to:
That worked perfectly.Code:oBook = oExcel.Workbooks.Open("C:\DailyLogs\DailyLog.xlsx")
I just thought I'd share my findings with others.Leave a comment:
-
VB form to fill Excel Template
My project is moving along smoothly- I've gotten a lot of info from this forum. One thread that helped me understand what I was doing is here. But I have a question I can't find an answer to.
My form fields will populate an Excel workbook. No problems there. My question is how do I call it to enter the data into an Excel template I have already created?
The location of the template sits in my C drive- C:\DailyLogs\Da ilyLog.xlsx... -
Thanks for your reply, your answer makes sense. I'm going to work this out and make it happen.
Thanks again!Leave a comment:
-
Thanks Stewart- you've made some valid points and I respect what you said. With that, I have a text box that will have data put in. I have a spreadsheet- and I've been pulling my hair out trying to get data from the text box to a cell in the spreadsheet.
Any sample code? I don't have any code because nothing is working. It seems there are so many different ways to do the same thing, I'm starting to really get confused.
I've...Leave a comment:
-
Yet another VB form to Excel transfer question
I have this form built in VB 2010 that mirrors an Excel spreadsheet. I've been at this for a month and I can't get this to work. I need the user to run the program and fill out the form throughout the day. Then I need them to save it to a corresponding date in the workbook with the fields having their data populated and transferred from the form.
I can't for the life of me get this to work and I am running out of options.
...
No activity results to display
Show More
Leave a comment: