I want to create a log of everyone who opens a particular workbook. I'm using Excel 2003. I found this macro, and created a worksheet called "Log", but I've opened the workbook several times and nothing appears on the Log sheet.
I have a script that exports an excel worksheet into an access db table and thsi is working fine. However i want to define a specific worksheet where the data is being exported from within the code but im having trouble doing, its using just a range at present.
I have a macro below that gives me a popup box that lets me type in the new sheet i want to access. etc(sheet1.xls) It give me 2 boxes one i must type the old sheet i currently access etc(sheet0.xls) and the next is the new sheet i will now be accesssing.
Is there a way to change this so i only get one box that will let me type in the new sheet i want to access?
I currently have a userform, and on commandbutton_click, it performs the following code that adds a column in a access table to a combobox(cbList)
Private Sub CmdName_Click() Dim rstName As ADODB.Recordset Dim strClientDatabase As String, strConnectionString As String strClientDatabase = ActiveWorkbook.Path & "9001.mdb"......
After its listed on the combo box, upon commandbutton_click on another button, i wish to extract a particular record, based on the selection made on the combobox(cbList). This is where im having problems caused i have no idea how to do so. I just want it to extract the particular record row, based on cbList, and insert it into range A100:D100 in a particular worksheet. It is then updated and added to a listbox which ive already done the coding for, and with another button click it would add the details in the listbox into the appropriate location i wish to.. The only place im stuck is with extracting the data from access into a A100:D100 range in any worksheet. what ive come up with, but is incomplete is :
Private Sub CmdImport_Click() Dim adoRS As ADODB.Recordset Dim strSQL As String Dim strClientDatabase As String, strConnectionString As String strClientDatabase = ActiveWorkbook.Path & "9001mdb" .........
I am trying to implement code that can handle a dynamic number of objects, specifically check boxes.
I know of eval( ) in perl that allows one to dynamically create command lines. For instance, the following code would change all of the Checkbox values to 1. The syntax may not be correct but the idea is solid.
Do While i < num_checkboxes eval("Checkbox" .i. ".Value=1) Loop
I want to write down the code that will populate values in "Sheet1" from the Access table. The column headers shows "Envelope types", "Envelope Size" fields from the Access table and each cell should store sum(volume) for each month in the table.
As I can't upload access table in the attachment so I have exported data into Workbook named "tblmain" as attached. But in actual tblmain is Access table. consider it an access table.
wrting code that will fetch data from access table and store in all the cells of the table in "Sheet1" of Elevate workbook.
I have a workbook with just one worksheet. It's just a list of data imported from Access and saved as a worksheet. When I try to enter a formula ie '=4+4' it goes in as text and will not calculate. I have tried various formatting to no avail. I added a second worksheet to see what happens and this works fine. (XP home, Excel 2003).
I am Generating Excel file with Macro using my asp.net (c#) application.
I am able to generate Excel file in development environment, but in Production it gives following error: "Programmatic access to Visual Basic Project is not trusted Line: Microsoft Office Excel"
I did googling a bit and found that I have to open Excel file physically make few security related changes in macro as below.
1. Open the Office application in question. On the Tools menu, click Macro, and then click Security to open the Macro Security dialog box. 2. On the Trusted Sources tab, click to select the Trust access to Visual Basic Project check box to turn on access. 3. Click OK to apply the setting. You may need to restart the application for the code to run properly if you automate from a Component Object Model (COM) add-in or template.
Can i do above changes at runtime (using some code)?
I have an Excel file ( named "Classes.xsl"), that has a worksheet (named "RawData") that is layed out something like:
Name Dept Class John 0547 Class 1 Jane 0368 Class 1 Jim 0368 Class 2 Sue 1235 Class 2
I am trying to get an Access-Like report without utilizing Access. Is there a way to generate a report similar to below using Excel as the data source (could be mail merge, perhaps a macro with a printout) I am not sure which way to try and was hoping someone could point me in the right direction...and possibly provide an example.
Class EnrollmentClass 1John 0547 Jane 0368Class 2Jim 0368 Sue 1235
I'm trying to build a query which matches two tables which say has a number like A#### , I want the query to give me the A number's which do not belong in the second table but which do in the first table. i believe i need an SQL query to do this?
The size of the table I'm importing will change, so i would like for the code to not matter on size. Also its, gonna be large too. The sheet will always be the same and the column headers will match for excel and access.
I need to compare data on a spreadsheet to data that resides in SQL database. I have never done this before so before I start I wanted to ask a general question, what is the cleanest, simplest, way to go about this. I read that ADO is a good way to access SQL. I understand that ADO is one of the main components of MS universal data access specifications so it sounds like the right approach (and that ADO is replacing DAO).
In terms of application, all I want to do for now is pull data from SQL and write it to a worksheet in the Excel workbook. Other macro's will then operate on this data. Later I will want to write data back to SQL but I want to focus on the "get" part first. Are the statements SELECT; INSERT; UPDATE; DELETE examples of ADO coding?
Conceptually, the SQL team provide nightly tables of data; ADO retrieves some of that data by selecting it; The selected data is written to a worksheet within the workbook. Is this a good approach?
For sales tax reporting we need to know the state, city, county district amounts. This would be simple if we could just sort by county/city, however we cannot because the state tax piece only only shows the word "UTAH" it does not give a city or county name. So we must sort by invoice #. This would be ok if we only had a few invoices in each city such as Salt Lake but we have have 40 or 50 invoice numbers in salt lake.
I need to find a way to keep all of the tax pieces that belong together, and subtotal by city/county. I thought if I had a formula that could change the state name "UTAH" to reflect the city for that invoice. This is the case for all states. Each state is 10,000 or more lines. I need to somehow grouping the information I need. I used the pivot table approach. However, since I must sort by invoice I still have 10,000 lines. I want to sort by invoice to get all the pieces then sort by county city. Any ideas of how I can do this? something in Access perhaps? a formual in excel perhaps?
i have an access database and is using excel to get the required data from the access database. I am basing on department to filter out the required data into excel. Below is the VBA code i use
deptClause = Worksheets("Records").range("C1").Value If Not deptClause = "All" Or deptClause = "" Then requestClause = " WHERE Department='" & deptClause & "'" End If
Queryline = "Select * from FailureQuery" & requestClause
the problem is i got one selection "All" in worksheet "Records" in cell "C1" and i cannot get this function to display all the data from the access. however when i choose a particular department it will show fine.
There are many examples and aspects to compare these 2 products but I just want to point one little difference which is quite crucial and interesting.
Generally if you use small amount of data - 1 Worksheet / 5000 rows / 20 columns you can use Excel without bothering about the execution time, queries and work fast and convenient with it.
The point on Excel is that in 1 Column/Row you can differently Format the data(cells). For example - format as Number or Hour the cells in Column B depending on the data in other columns. That saves you from making 2 Columns - one for Numbers and another one for Hours. This helps you to save 1 of the columns when the data structure in other column is the same.
In Access (and generally all SQL DBs) this is not possible.
I have an Excel spreadsheet that I have developed into an over the top flight calculator/scheduling tool. I am using Excel because developing this prduct into a stand-alone program would be absolutely murder to get approved for use on my network.
Since Excel and Access has already been approved, I began coding this project there.
Now that my calculator functions are nearly complete, I am beginning to develop a database of airfields and other misc. flight data that I and others on my network can see and manipulate. To make my calculator funtion at 100% effectiveness, I will need to use VBA to open the Access DB and pull out specific data. I will also need it to open and display some Access pop-up forms that I have just developed. Does anyone know what code I would use for excel to display and retrieve Access' information?
I am trying help protect a project from all my colleagues that have a version of password breaker that is actually an add-in. I have already managed to disable or grey-out all of the other commandbar options that I don't want them to have access to during their use of the model but can't figure out how to disallow them from accessing the "Add-ins" option from the "Tools" menu. I can, of course, disable the entire tools menu but don't want to do that yet.
I would really like to be able to have a function in a workbook that can run methods (for example Show or Hide) on a UserForm inside an add-in like this:
Public Sub Test_Addin() frmTest.Show False End Sub
where frmTest is a UserForm inside the addin. After the add-in has been added as a reference, I am able to access all of its functions/subs in this way. When I try to access a form inside the add-in from outside the add-in, I simply get an object not defined error. Looking more closely, if I type in "eRFTEAddIn." (which is the name of the add-in) and look at the possible options, the forms do not show up...although the modules and sheets do.