No code in the sheets.. access now pointing to the correct sheet and all working fine. :)
Ok its now 22:00 here in the UK and have been playing with this since I finished work at 18:00.. I think its time to give my eyes a break. :p
Well from Access anyway. Time for some html/php now! :D...
Hmm, Until I added the compatibility part above save it was stopping at the save point :confused: I am using access 2010. Would this cause any issues!? I will try again without and see if it runs. :)
Just need to point to a set sheet now.. Would assume that is easy enough :)
Edit:- Now...
Lol, Yes I soon realized that and amended (see above post!) :o I think I'm almost there.. :) Just need to point to correct sheet on final workbook and should be good to go! :D
One other thing.. While making the sample sheet I saved as xlsx. But the sheet sent to us is a xls. Is there a...
Ok done it! :) Now have (as you said above!) :o
Function RenameColumn(strWorkbookNameAndPath As String)
Dim objXL As Object
Dim xlWB As Object
Set objXL = CreateObject("Excel.Application")
Set xlWB = objXL.Workbooks.Open(strWorkbookNameAndPath)
xlWB.ActiveSheet.Range("A1").Select
Do...
Ok, Just changed to -1 but now getting the same error as before.
so I now have in Module2
Function RenameColumn(strWorkbookNameAndPath As String)
Dim objXL As Object
Dim xlWB As Object
Set objXL = CreateObject("Excel.Application")
Set xlWB = objXL.Workbooks.Open(strWorkbookNameAndPath)...
I now have it updating the spreadsheet output is current date but it is updating the total column not the column before. Would you still like the above code?
Thanks,
Just trying now..
Added code to a new module and then in my form added RenameColumn "Path to sheet"
but I receive this error
1004 - Application-Defined or Object-Defined Error
Any ideas?
Yeah all data is coming from a spreadsheet first. I would ask someone to rename before import but would like to avoid any manual intervention. The sample sheet with the data headers can be found here.
coatezy.co.uk/sample.xlsx
Thanks!
Tom
As above Bob, ghudson's method would work if it was the last column but unfortunately there are other columns that follow and a new one is also added each month.
Thanks for your help so far guys! :)
Thats the another problem.. My total field isnt on the end. There are 4 other columns after the total column that are added each month! :mad: So I think my only option is to look for "total" and -1. :(
Cheers
Tom
It really is a case of I have to do it like this... unfortunately another large company is supplying some very messy data and this is the only way I can get around this.. This database is not being used to hold any long term data... purely to import some data run a few queries and pump them out...
Hi
I have a bit of a strange one.. Have to query a column in a table that is imported from an excel spreadsheet in to access. problem is a new column is added each week so the column name changes.. (I know really bad, but its what I have to work with from a 3rd party)
The one thing that never...
I am trying to do a simple if statement (well probably simple for you guys) but im having a few difficulties.
I want to check after update field
If its after 16:30 and today’s date has been entered then display a msg box..
If before 16:30 and today’s date then no action and the same...