Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Excel


Worksheet Access Log

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.

View Complete Thread with Replies

Sponsored Links:

Related Forum Messages:
Access Another Workbooks Worksheet
In another thread I was able to access another workbook with a listbox.

I'm now trying to do the same thing with a command button. Here's what I have so far without success.

Private Sub CommandButton4_Click()
With Range("'Estimate_Database.xls'!ELECTRICAL")
End With

End Sub

The file path being C/Documents/Estimate_Database

View Replies!   View Related
Best Way To Populate Worksheet From Access Database
I have an excel worksheet that I need to populate with a few thousand data points from MS Access. Currently I do this through vba code somewhat similar to this:

rst2.Open myQueryString, cnn, adOpenKeyset, adLockOptimistic, adCmdTableDirect
Do Until rst2.EOF
wsht1.Cells(1+counter, 1) = rst2!val
counter = counter +1

Now this method works, but it is pretty slow to load. I remember reading as a general excel optimization technique you should avoid using long loops accessing cells on an individual basis.

Is there a better way for me to dump large clumps of Access data into Excel, instead of populating it cell by cell?

View Replies!   View Related
Macro To Access Worksheet Via Popup Box
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?

View Replies!   View Related
Exporting Worksheet To Access Table
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.

View Replies!   View Related
Restrict User Access To Worksheet
I am creating a spreadsheet for work - I have a column that is all the formulas projected sales minus actual sales.

I need to lock this column so that no one BUT MYSELF can change the codes. In other words "idiot proof" the worksheet. there are only 18 sections that I want anyone else to be able to type in.

is there a way to do this without adding users? half the ppl have personal emails and half have company emails.

View Replies!   View Related
MS Access Data Import Into An Excel Worksheet.
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"

View Replies!   View Related
Access Worksheet Controls Properties & Methods
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)

Does this funtion also exist in excel?

View Replies!   View Related
Access/read Data From A Hidden WorkSheet
I'm trying to access/read data from a hidden WorkSheet in Excel 2003 using:

Application.Worksheets("Hidden Sheet").Activate
With ActiveSheet
**** Data ****
End With

The accessed **** Data **** refers to another ('unhidden') WorkSheet. How can I read the data without making the WorkSheet visible to the User?

View Replies!   View Related
Show Worksheets Tabs On Current Worksheet For Easy Access
You could use:

If ActiveWorkbook.Sheets.Count < 17 Then
Application.CommandBars("Workbook tabs").ShowPopup
Application.CommandBars("Workbook tabs").Controls("more Sheets...").Execute
End If

The code doesn't do anything on my excel workbook which currently has like 20 workbooks, and it grows daily by like 4 or 5 worksheets.

View Replies!   View Related
Entering Formula- Data Imported From Access And Saved As A Worksheet
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).

View Replies!   View Related
Programmatic Access To Trust Access To Visual Basic Editor
I am Generating Excel file with Macro using my (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)?

View Replies!   View Related
Access-Like Report Without Utilizing Access
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

View Replies!   View Related
Access Vs Excel As A DB
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.

View Replies!   View Related
Excel Or Access?
I need a front worksheet with either buttons or tick boxes that will list different options for a machine

Once a tick or push button is activated a hidden block of text related to that specific tick box needs to be selected and placed onto a final print out sheet (allocation)

when futher boxes have been ticked I would like all the information blocks to build up on the final print out sheet.

View Replies!   View Related
Where To Access Ozgrid Add In
I have installed the free version of Ozgrid.xla, but do not see where to access it.

View Replies!   View Related
Using Access 2007
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?

View Replies!   View Related
Getting All Data From Access
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.

View Replies!   View Related
Formatting Using Access VBA
I have the following code set up and every works except for PaperSize and Margins. Is there a standard VBA code reference available somewhere that addresses Access to Excel operations? Thanks

With xlApp.ActiveSheet.PageSetup
.PrintTitleRows = "$1:$2"
.PrintTitleColumns = "$A:$C"
.LeftHeader = "XYZ Financial Wonks, Inc."
.CenterHeader = ""
.LeftFooter = "&Z&F"
.CenterFooter = ""
.RightFooter = "&P of &N"
' .LeftMargin = = xlSheet.InchesToPoints(0.25)
' .RightMargin = xlSheet.InchesToPoints(0.25)
' .TopMargin = Application.InchesToPoints(0.25)
' .BottomMargin = Application.InchesToPoints(0.25)
' .HeaderMargin = Application.InchesToPoints(0.25)
' .FooterMargin = Application.InchesToPoints(0.25)
.PrintHeadings = False
.PrintGridlines = False....................

View Replies!   View Related
Formula Or Access
I have a very unuserfriendly report that looks like this

State - ype - County/City - Invoice # - Ref # - Amount
UT - Tax Billed - Salt Lake - 073714 - 238025 - $10.82
UT - Taxable Sales - Utah - 073714 - 238025 - $983.75
UT - Tax Billed - Slt Lk Cnty 073714 - 238025 - 4.92
UT- taxable Sales Slt Lk Cnty 073714 - 238025 - 983.75
UT - Tax billed - Utah - 073714 - 238025 - 46.73

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?

View Replies!   View Related
Getting A Value From A MS Access Database
I was wondering if there was any code that would 'lookup' a value in a MS Access database in the same way that a Vlookup formula looks up values in tables in Excel.

Even better, if there was a fuction already written to do this.

View Replies!   View Related
Disallow Access To Add-ins
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.

View Replies!   View Related
Access Query
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?

View Replies!   View Related
Converting From Access
I am trying to convert An Access macro/function programs to Excel and I am having trouble processing the following in Excel:

Set rsbuildinforce = CurrentDb.OpenRecordset(InfTable)

(InfTable) is defined as an Access linked table name. The values of columns in rsbuildinforce drive the logic of the macro/function

The object of the program is to read in data from excel, do some manipulations, reformatting, etc... and output .csv files.

View Replies!   View Related
Using VBA To Access Information In SQL
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?

View Replies!   View Related
Sql Import To Access
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.

View Replies!   View Related
Exporting To Access
to write a macro to export 3 columns of information from excel into a table in access.

View Replies!   View Related
Access From Different Logins
I have created few excel files from "X" login account and when i try to open it from the "Y" login account, it opens it in the read only mode. do you know how to access it from Y account in the edit mode or the write mode.

View Replies!   View Related
Cannot Access UserForms In Add-in
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.

View Replies!   View Related
Access Databse Connections In VBA
From within VBA I need to open a database connection and issue a select and store the results in my spreadsheet. The issue is that I only JUST learned that you can do this and I dont know where I can look for instructions. Incase it matters, I am trying to connect to a Sybase DB. I have used perl, c# and a little bit of Java to do this but never from with in Basic (let alone basic within excel!)

View Replies!   View Related
VBA Access To Xlveryhidden Sheet
I used the xlveryhidden method to hide a worksheet that contains all of my validation lists for drop-down range names. Unfortunately when I try to access the sheet without unhiding it, I get a Microsoft Visual Basic Run-time error '1004': Select Method of Worksheet class failed

Is there a way to let VBA access the xlveryhidden sheet through a macro without unhiding the sheet?

View Replies!   View Related
Importing Data From Access ..
I need to import data from an Access table (which is straightforward enough), but there's a snag.
All the rows are dated (10 rows per day) and I want to start from a specific date and get everything after that date.

Anyone any ideas if this is possible and, if so, how to do it?

View Replies!   View Related
USerId And Password To Access A WB
I have made an excel file the use of which I want to restrict to a few people. So I want that whenever the user will open the file it will prompt for user id and password. If these matches then he will be allowed to access the file. Thre types of user id and password is required:

User! : Can modify, edit, delete, etc ie full access (Adminstrator type)
User2: Only access to print (no entry,edit,modifiaction,etc)
User3: Only be able to see the file and no print,entry,etc access.

If all are not possible, then provide code for part.

Macro will always be enabled as I found code on the net to force user to enable macro. ie if macros are not enabled, it shows another rough page. So enabling macro is not a problem.

View Replies!   View Related
Populate Combobox From Access
i have the following
Dim cn As ADODB.Connection
Dim qc As ADODB.Recordset
Dim Equip_File As String
Dim Equip_ID As String
Dim Equip_Param As String

Set cn = New ADODB.Connection
Set qc = New ADODB.Recordset

cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\ServerDISK 1UncertaintiesUncertainties.mdb"
'Populate QC Number Dropdown menu
qc.Open "SELECT [Equipment_QC] FROM [Equipment_Table]", cn, adOpenStatic
With ComboBox12.List
Do Until qc.EOF
End With
Equipment_Title.Text = rst.Fields.Item("Equipment_Title").value

however, i cant seem to populate the list, i get error :424 object required

is this because the first record in the db has the Equipment_QC field blank? i need to be able to have blank fields..

View Replies!   View Related
Import From Access Using Excel VBA
I use Excel 2003 and am trying to import information from an access database. The recordset I am looking for is based on Cell B3 on a worksheet named Import.

Is there a way that Excel VBA Can do this?

The recordset contains text in the standard of Memos, Will I be able to import the entire Memo?

View Replies!   View Related
3 Layer Relationships - Vba? Use Access Instead
hi trying to vreate a table for user to upload data. some fields have a relationship and can only select ceratin things from a list dependent on what the previous columns selection is.

Column A selects from defined list 'animal' -cat, dog, mouse

Then if they select "cat" columc c uses define list 'cats' = siamese, persion, mungrel

but if they select dog it will force use of defined list 'dogs' = poodle, labrador, mungrel...

but i then need to add a third layer to this!!!! THIS IS WHERE PROBLEMS BEGIN!

2 layer is fine for :

but this will not work if for 3 layer..... example colum b, could be a dog or a cat, if mungrel is selected. if the 3rd column depends on both of these ie it matters what column a and b is before 3rd list is defined.....

plus im going to have about a hundred defined lists at this rate.. and ther will be other realtionships in the same table.... :S

i have the relaonships in the format of a list of possible combinations i.

cat siamese grey
cat siamese black
cat persian white
cat persian black
cat mungrelwhite
cat mungrel ginger

dog poodle black
dog poodle pink ....
dog mungrel white
dog mungrel black

There must be an easy way!!!! do i have to use Access?

View Replies!   View Related
Add Data To Access Database
Is there a way for an excel macro to open a access database & import a txt file straight to access (without importing to excel first) & then executing some other code e.g. copy query results(which i already have code for)

View Replies!   View Related
Open An Access DB From Excel
I am trying to open an access database from excel by clicking a button. I have assigned the following script and modified it for my own use as according to the microsoft kb.

Private Sub CommandButton2_Click()
'Opens Microsoft Access and the file nwind.mdb
Shell ("c:Program FilesMicrosoft OfficeOFFICE11MSACCESS.exe T:TSD - UKProjectsSteve's ProjectsT3FCRs.mdb")
'Initiates a DDE channel to Microsoft Access
Chan = DDEInitiate("MSACCESS", "system")
'Activates Microsoft Access
Application.ActivateMicrosoftApp xlMicrosoftAccess
'Runs the macro "Sample AutoExec" from the NWIND.MDB file
Application.DDEExecute Chan, "ImportData"...........

View Replies!   View Related
Importing Access Table As It Is
i have posted previously with a similar request , and i am still trying on my own.

i want to import one table fully from a particular MDB ( access ) file.

i recorded a macro to that efect which looks like this.

View Replies!   View Related
Export Sheet To Access ...
Im looking to export a sheet from excel to access. The sheet has the same tables as does the access database. I need the code for this because I dont want to have to import from access manually each my users only have permission to use the excel sheet, as I dont want them messing with the info. Any Ideas?

View Replies!   View Related
No Access To The Features In The Ribbon
I'm trying to finish a project, but the features at the top of the ribbon are faded out which means I have no access to any of them. How do I get access to them?

View Replies!   View Related
Import The Last Row An Access Table
Is it possible to import the last row an Access table into Excel either through VBA or an excel function.

I need it to be only the last row, due to the size of the database, I have tried importing using a query but this takes a long time as it checks each row first.

Is there a way to find the last row automatically a bit like this in excel.

myendrow = sheets("sheet1").range("a65536").end(xlup).row

View Replies!   View Related
Access All The Applications Which Are Opened
Is there any way to access all the applications which are opened through only Excel.. Like creating a menu which will list all applications that are running.. like Word., other excel workbooks,Notepads etc?

View Replies!   View Related
Close Application Via VBA From Access
Looking for code that will verify if Excel is running and if so, then close Excel, including all hidden versions.

View Replies!   View Related
Time Format Like In Access
How can I get my time format in excell to be like it is in access ie. 1:00 Pm. I want to put the time format in my excell spreadsheet and make sure that people enter the time in that format and I dont want to lock the sheet. So is there a way to make certain that the time they put in is the way I want it!! 1:00 PM

View Replies!   View Related
Connect To Access Using ODBC
how to do this with Java but not VBA, I have the capability of understanding it I just need to know where to look because I can't seem to find any solid information on the net from my searches. Does anyone have any websites, other threads or anything they could direct me to for this kind of thing.

I was contemplating putting this in the Access thread but I want to connect to Access through Excel so I think it fits both.

My plan is to use a macro to send specific cells to five seperate tables in an Access database using VBA and SQL.

View Replies!   View Related
VBA To Query A Access Database
i am trying to use VBA to query a access database that i have i want to be able to pull the information that matchs either textbox4 or 5 i am using the code below but i am getting global errors.

Private Sub CommandButton1_Click()
Dim custname As Variant
Dim Custnum As Variant
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
custname = Range("TextBox5").Text
Custnum = Range("TextBox4").Text
With ActiveSheet.QueryTables.Add(Connection:=Array( _
"ODBC;DSN=Insolvency;Description=Insolvency;APP=Microsoft Office XP;DATABASE=Insolvency;Trusted_Connection=YES"), Destination:=Range("Listbox1"))
.CommandText = Array("SELECT * FROM POST WHERE Customer_Account_Name=" & custname & " AND Customer_Account_Number = '" & Custnum & "' ORDER BY Customer_Account_Number")
.Name = "Insolvency Post Query"..........................

View Replies!   View Related
Add The Information Into Access Database
I just wanted to know if there was a way to add the information contained within an excel form into an access database using a macro? What I am looking to do is automatically have the data added when I press a button, or when I close a worksheet.

View Replies!   View Related
Access To Pop-up Main In Sheet
I created a popup menu when you click the right mouse bhutan .. ok?

Now I would like to access the pop-up Main excel, where you click with the right mouse button and appears Cut, Copy.

then I would like to add a new a item in this pop-up

View Replies!   View Related
Access Data Import
I am having some issues importing data from Excel to Access. I am attempting to import about 45000 rows of data from Excel to Access. It appears Access is only importing about 16000 of the 45000 rows. I am using 'import' in 'get external data'.

View Replies!   View Related
Connect To Access Database
I was trying to move data from excel to access database in VBA. not sure if this has been done before.

What i have got at the moment is that there are some data in excel spreadsheet that i can dump into the table in the access database. My problem here is i need to be able to open the database first, set up connection, and then perform SQL insert query command.

So in the worksheet, i have a button with the following codes in it
so far i could just manage to open the database as follows

View Replies!   View Related
Copyright 2005-08, All rights reserved