Hi,
In VBA if I do
Workbooks.Open fileName
If the user has a file with the same name already open is there a way to catch the error and ask them to change the selection rather than returning a debug message.. that only lets you end or debug the method?
Hi,
I am using Application.Union to combine several 1 column ranges together.
However I want to be able to order them in order the arguments are supplied to the method and not in the original order the columns were in. Is this possible?
Example:
Col1, Col2, Col3, Col4, Col5, Col6, Col7...
Hi I came across this code for removing non alphanumeric from a cell value in VBA.. but I have not tested it yet.
I was wondering if anyone knew of one that can be used for European languages as well. e.g. Taking Éé and Úú into consideration. Or is it better to do a like on symbols I dont want...
Hi I have got the below code, I want a function that passes the values to my list box or combo box on a user form. I didnt like the idea of passing a recordset so i put it in an array.. problem is how do i reuse it as an array to populate the listbox?? the below doesnt work :(
Function...
Hi, the below code seems to work ok.. It adds records to a temp table, compares them with the existing table using a query and then imports the ones that dont match as new records.. then deletes the records in the temp table.
The only issue I seem to have at the moment is when deleting around...
Hi, I am asking for some help to improve the speed of the below subs. Specifically taking ~5mins in Excel when I run through a list of 5500 unique 18 digit text codes.
I am using a query in an access dbase so that I can use these subs on different joined tables trying to keep things simple but...
Hi,
I am trying to find examples of how to compare the two below tables using ADO preferably.
The comparison would be:
Look at the product code in the Excel table
check to see if it exists in the Access table
If it does then check if the product description for that same record also matches...
Hi
I have got a field in a table that is used to hold a code for a product.
The code can be between 2-10 digits and sometimes the input has leading zeros sometimes it has trailing zeros.
I believe that this should be stored as a 10 digit number where leading zeros are added for any that are...
Hi,
I have written the below sub to insert Access table data into my Excel file.
Sub InsertAccessTable(tableName As String)
'
Dim MyDB As String, connStr As String, sqlStr As String
MyDB = ThisWorkbook.path & "\" & "master.mdb"
connStr = "ODBC;DSN=MS Access Database;DBQ=" &...
How do i export text from selected cells in an Excel sheet into a newly created word document using a macro or subroutine?
Trying to do the below where 'value' is text in Excel or maybe if poss text in a separate word document that can be copied to the new word doc:
Key: [cell,value]
[A1...
I have an asp page that you can use to download a table from an access dbase into a saved excel file and then once you have editted the excel file you can upload the file into the dbase again.
Any changes to existing id's get updated and any new rows without an id get inserted.
The problem i...
Hi,
I have an Access project file linked to an sql server database.
At the moment i have a form that you can use with combo boxes which will create a custom sql statement depending on what the user picks so that the sql can be used as the filter for an Access report.
The code for exporting...
Hi,
I am doing this at the moment in my .adp file.
DoCmd.TransferText acExportDelim, , "QryExportAll", "P:\Export\Data" & Format(Now(), "mmddyyyy") & ".csv"
The view "QryExportAll" exists in the sql server database in the above case.
When trying to run it i get a runtime error '7874'...
Hi,
I am using a .ade file, linked to an sql database.
The query is very much the same as in a .mdb, i just changed it a bit and put it in the sql database.
At the moment the query is displayed in a report for printing out, i was wondering how to do an export function that will put the...
Hi,
I have setup 2 combo boxes, one for amount in words
eg. TenThousandPounds
and one for the amount in £'s eg. 10000.00
The combo boxes have 4 different choices and the user has the ability to type their own amounts in as well.
The problem i have is that if someone enters in...
Hi,
I have been searching around for how to do this with little success.
I have an xml file and i have created the table in mySQL, i just have no idea how to put the data into the table :-).
I cant find exactly what i want, so my search criteria must be incorrect.
If anyone can point me in...
Hi,
Could anyone please point me in the right direction for what method is used for creating an xml document?
I have a two dimensional array which has 1 column holding a variable name and the other column holds the value of the variable.
Using the below code displays the firstname value in a...
Hi,
Here is a bit of background to the problem first before asking my question...
I have some vba in Outlook that saves any text file attachments on emails to a folder location.
folder location for example is P:\Imports\emailTest\
I save the attached file with the date format(yyyymmdd) and...
Hi,
Can i ask if anyone has any information on how to do the below?
I have so far created a macro to be run by the user to read all email items in a folder they choose and save all attachments in an explorer folder of their choice.
What i want to try and do is have a macro that runs as part...
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.