I seem to be coming on here every day at the moment! Someone helped me with this code, it works great apart from 1 error, which stops the script. The lines that appear when i select debug are in italic / bold. The error message appearing is:
"Object invoked has disconnect from its client" or something very similar.
'Define variables.
Dim lngRowPasteTo As Long
Dim codelive, codeclosed, codeassigned, vLookFor As String
I have created workbooks for four health regions to collect data, which then needs to be resubmitted via FTP, but with de-identified data. The end users have little to no excel experience, thus had to make it simple as possible. Created a button that runs the macro (below) to deidentify (clear) all cells where there could possibly be personal identifying information. Runs fine on my cpu, but one user (so far) has received the error noted in the title. Both running excel 2003 with SP3 (I have version 11.8169.8172, user has 11.8316.8221), I have XP professional SP2, user has XP professional SP3. Spent hours searching and reading suggestions online, to no avail.
I developed an Excel application for some users. Everything used to wrok very well until recently. When the click some buttons, the error "Automation Error: Object has disconnected from its clients" appears. Problem is, everything works very well on my PC. We run the same Excel version, same OS but I can't seem to find a solution to this problem. I'd have posted the code I'm running here but I don't know how to use the code tags and I don't want to be banned from this forum.
-2147417848 automation error the object invoked has disconnected from its clients
Unfortunately, I can't tell where the error is occurring because everytime it happens excel crashes or at least stops responding. I tried waiting it out (about 20 minutes) but no luck. the only thing I can do is force the program to shut down through the task manager.
The program is designed to pull information from finviz.com (a financial site), filter the data. pull the next round of data and run the filters again. there are a total of 8 queries and i think it gets hung up during the 6th or 7th run through.
Stepping through the code does not seem practical since each query might pull as many as 300 rows of data that is evaluated in a for/next loop (thats a lot of F8s).
I'm trying to do here is take the value of a certain cell (client number) and set another cell to be the name of the client. For example if I were client number 100 and my company name was Holman Inc the user should be able to enter 100 and Holman Inc would populate itself in the next field.
When a QueryTable is refreshed and the number of rows it returns changes, I *expect* that a corresponding Named Range should be automatically resized. The sheet-level Named Range (same name as the QueryTable) should cover the query result's header row and all returned data rows.
But now I've got a Named Range that seems to have become disconnected from its QueryTable. The query returns fewer rows but the Named Range stays the same size.
This is even more perplexing because the aberrant QueryTable is right next to another QueryTable that is behaving normally. The Data Range properties of both are identical.
I wrote a script to get stock quotes from yahoo finance and place the info on a spreadsheet. The script reruns every 15 minutes. All works fine until the computer goes to sleep, then upon waking, the error 1004 appears with the debug or exit options, telling me it cannot find yahoo finance. The error occurs because the computer takes @ 3 seconds to reconnect to the internet on waking.
If I choose debug, and continue the script it completes without error. The script will continue once again collecting stock quotes every 15 minutes until the computer exits sleep mode again.
I have tried using On Error GoTo 0 On Error Resume Next
both still result in the error 1004.
What I would like is for the error to be ignored, and the script to complete.
I have an excel file from a data dump. I need to populate the client name next to the total. There is no unifomed lines between the different client files. The file has over 12,000 lines I am in need of a formula to poplulate the blank cell. See attached file.
to send a single email from a list if addresses from cells in a single column...i have figured out the code to add the range of addresses but my only problem is that with this code it uses outlook...my default email is gmail and i can send email from single cells this way, however when i run the code it opens it in outlook..i do not now how to change the code i have to open gmail instead of outlook..
I have been sent a document of clients names that I need to check against our own, is there a way on excel in which I can see if there are any matchers between our client list and the one I have been sent. It is for security purposes.
I have a workbook to track clients served. The first sheet has all of the data entered into it. The name, age, demographics, services. The second sheet is a template of the individual client's pages, summarizing their information and services received. I want to code the sheet so that once a new client is entered into the table on sheet 1, the template will automatically be copied to the end, renamed, and the basic data for the new client will be pasted into the new sheet.
I've been working on this project and done a ton of googling. And also am very new to VBA. I have found a solution that works:
VB: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$B$2" Then Sheets(2).Copy After:=Sheets(Sheets.Count)
[Code]....
But I really don't want to do 50 "else" clauses for each line where there could be a new client. So I was thinking, if i could find a way to do a relative reference, such that it selects the cells to copy relative to the one that was changed within the range of that column, then I would only need one "if" statement. Is that possible? Is there some way to change the "B3" in target_address to "any cell in column B" and then range "A3" a few lines down would somehow be "1 cell left of the one changed" and the range "A3:K3" to copy would be "1 left:9 right" of the one changed. I know this may be impossible or just not how VBA language works, but I thought it'd be a lot easier than 50 repititions of if..then...else....
I have sales data for Clients that has the client name month and year(combined for date) and revenue for each month. I would like to take all clients in a given month and see the average revenue per client and then be able to display that in a bar chart by month. I also have the data loaded into a PowerPivot Data Model.
I have a long list of data (around 10,000 rows) with one column Client Sensitive (Column A see below) that needs to be changed before using in a pivot so the client won't see this data.
At the moment I'm using a formula but happy to use VBA for this as the rest of the report updates with VBA.
The formula that works but takes far too long is =IF(COUNTIF($A$1:$A2,$A2)>1,VLOOKUP($A2,$A:$R,18,FALSE),MAX($R$1:$R1)+1) Where column A is the sensitve data (and the unique identifier) and column R is the column the formula is entered.
The below is what I want, the column R I now use in a pivot to get the results I want then I can hide that column and delete Column A so no Client Sensitve data is with the spreadsheet.
However as I've said it takes far too long to calculate down 10,000 rows..
I have monthly reports of sales by client number. I am now trying to pull the annual sales info by month for one client by name. Eg. each month, XYZ ltd has sales figures for various products. Is there a way of me grabbing all his sales info for the year with out having to open each spreadsheet
I have developed a product that's a bunch of Excel spreadsheets strung together. Real estate and mortgage professionals use the tools to counsel home buyers. We include a pdf converter in case recipients of emailed file attachments don't have Excel.
We provide an 'Export' procedure that calls a custom dll that uses the outgoing mail server that the user [must] setup or our web's mail server as a default. The action attaches the Excel or the PDF file and sends in the background. We use an Excel form for user to write the message and the process saves a copy of the message sent and the file send in an Archives folder.
This procedure is not very user friendly, as it does not offer the user's address book to select a recipient, does not put the message in the user's email client Sent folder...Plus the Archives folder could become quite large...plus it involves a user setup that creates alot of support calls.
But actually the most critical shortcoming has become that ISPs (Comcast and ATT so far) are blocking the use of custom email clients!
Recently my son showed me in QuickBooks their attach file-to-email process. It simply opens the user's default email client with the file attached. I need an app that does that! And it needs to be distributable.
When I test the email link on my computer, the 'Outlook Express setup' wizard initiates. However, I don't use Outlook Express (Yahoo and Zimbra). I am wondering of it is possible to automatically ensure that in cases where a user doesn't use Outlook Express by default that Excel will open the users default email client- which could be a web browser or another application? Is this something determined by each users (Control Panel?Registry?) settings for handling email hyperlinks? Is there a piece of VBA code I could include in the workbook which identifies the relevant email client to open?
I know I can simply provide my email address on the workbook and allow a user to copy/paste it into their email application but I feel that by minimising the amount of effort required by a user to provide a rating that I'll be more likely to receive user rating feedback.
1) i have office 2003 on a laptop. within powerpoint, i can create a 'microsoft excel chart 11' object. to create a link to the excel data source, do i have to go through the odbc sql setup? it works, but i don't want my powerpoint to be dependent on some excel file somewhere. what are the other options to insert/make a functional pivot chart in powerpoint with the data also within powerpoint? the data as sheet option does not result in the chart being a pivot, it's just a plain chart. it has to be a proper object, not an image paste or a chart that updates links with the excel file open.
2) i have office 2007 on my other laptop. i can not find any suitable object to choose from to make a pivot chart in powerpoint. what's the best way to go about in 2007 version?
3) am i going about this the wrong way with the objects? should i be after vba code?
I am having difficulty getting a form to work the way that I would like it to work. I have a form that is used to display questions that my students will be answering. The form also is used to put the answers into a worksheet. I have 2 sheets. Sheet2 has the questions, student answers, and correct answers. Sheet1 is used to indicate correct answers and to keep track of percentage correct. I am fairly new to VB. I have 2 pieces of code that I am going to post. The first one works and the second one doesn't.
This is in the "This Workbook" section and it works. Option Explicit Public intNoQ As Integer Public strNoQ As String Public NumberofQuestions As Integer Dim StudentName As String Dim InputBoxAnswer As String Public Sub Workbook_Open() Application.Visible = False 'Hide Excel Load Questions Load NumberCorrect NumberofQuestions = Worksheets("Sheet1").Range("K3").Value For intNoQ = 1 To NumberofQuestions strNoQ = VBA.CStr(intNoQ) If intNoQ = 1 Then Questions.Controls("QuestionNumberBox").Value = "Question#" & strNoQ Questions.Controls("QuestionBox").Value = Worksheets("Sheet2").Range("B1").Value End If Questions.Controls("CorrectBox" & strNoQ).Visible = True Questions.Controls("CorrectLabel" & strNoQ).Visible = True Next intNoQ...............
This code is part of a routine that copies and pastes from CASH RECEIPTS sheet to YEARLY TOTALS sheet in the same workbook. rngCash is assigned as a Range variable.
In the various fixes I’ve tried, the code worked to varying degrees.
Code: Dim Recurring_Total as Range With .Range("A" & Rows.Count).End(xlUp).Offset(,2) Set Recurring_Total = .Range("A" & Rows.Count).End(xlUp).Offset(,2) .Font.Bold = True End With
with the line "Sheets("Hidden Data").cells(rngfound.row, 9) = sheets("data").range("l18")" the error messages states Object Required, but i am not sure what this is trying to say.
any idea's or thoughts would be greatly appreciated.
at the top of the coding i have listed "Public rngFound"