Hello,
I have a workbook with two sheets. I am trying to use VB to make sure the totals on each are equal, as they should be. This is my code thus far.
Private Sub Compare_Click() Handles compare.Click
Dim oxl As Microsoft.Office.Interop.Excel.Application
Dim oxlbook As...
Hello,
I am using the following code to copy a range from one sheet, and paste it into another. I had thought the code works, but something is wrong, as no matter how I change it, I get the entire data range pasted regardless of what I set to copy. My code is as follows:
copyrange =...
Well I think that is my problem, the correct functions from the Excel libraries. xlUp doesn't seem to be the right one, but I can't find out for the life of me what the correct syntax is.
Hello,
I am using VB Express to automate some functions in Excel. Currently I am trying to populate several cells with text. I was able to do this quite easily using the VBA built into Excel, but I want to automate everything through VB, rather than running a macro from another sheet.
The...
One last question. How would I use that string to be placed in my excel file in another sub? Since dateneeded is declared in the separate sub, I do not know how to refer to it from my query sub.
Awesome, thanks River. Only one last question. And this is kind of a newb question. How can I store the date selected as a string, then use it in my code?
Well here is my entire block of code.
Public Sub Summary_click() Handles summary.Click
Dim usercontrol1 As New UserControl1
Dim temp As String
Dim oxl As Microsoft.Office.Interop.Excel.Application
Dim oxlbook As Microsoft.Office.Interop.Excel.Workbook...
Well yes I figured as much, I guess where I'm having trouble is the code required to pull the date from the calendar. I switched to try using the datetimepicker, but still the code is holding me up a bit.
Hello. I have a code that runs through a DIR of Excel sheets and updates them. What I am looking to do, is before it refreshes my Excel query, I want to insert a date on the current workbook. But I want a calendar to pop up and the user to select the date. My code is as follows:
Do While temp...
Hello,
I am combining and saving an excel file. Currently, this is how I am doing it.
newName = "Z:\2009 Combined Delinquencies\April\" + path
oxlBook1.SaveAs(newName)
What I would like to do, is create a listbox of the 12 months in the above directory, and have the user choose the month in...
Hey everyone,
I am using some code to combine two workbooks in Excel into one. I am using the DIR command to run through directories of the original files. My problem is, the first Dir seems to work, but the second one doesn't. My combined file has each of the first directories file, but only...
Figured it out. I tried putting single quotes around the Book5, but I had to put it around the whole path.
oxl.Run("'C:\Documents and Settings\Bob\Desktop\Book5.xls'!DelinqNormal()")
Darned single quotes. Thanks River.
Well I guess I could do that. I was just trying to keep it separate, for what reason IDK. There wouldn't be any problem on the user end though, as once I run the macro, I would save the file separately, then post them to a website for them to view. They only need the end result. And I also...
Hello,
I am using Visual Basic 2008 to open an excel sheet. I want to run a macro from a separate sheet, as I don't want clients having access to running it, as well as most clients have macros disabled and it throws an error when they open it. Anyways, my code looks OK I think..
Dim oxl As...
Thanks Skip, I'll give it a try. The solution I found myself, while sort of messy, is selecting all visible cells in Column A, then put Total in the formula bar and press CTRL Enter.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.