I have the following line of Selection.AutoFilter Field:=1, Criteria1:="=2009_15", Operator:=xlAnd
The highlighted portion is going to change from week to week. I have never been able to put a variable inside of quotation marks. I am sure it is simple, which explains why it is out of my mental grasp. how I can assign a variable in there?
To prevent the display of values in a worksheet, I have used an If statement in the format: =IF(I67=""",""",I67). This generally works well; however, I have discovered that if the input value for I67 is actually zero, there is no value displayed in the cell. I need the value to be displayed as a numerical zero so that it can be used in subsequent calculations.
I have an excel program that reads a file and prints it to the work sheet, but I can't figure out why it puts quotation marks around the line of text. I would like to remove the quotation marks from column A and column D.
I'm using a query that dumps information into Excel. The query automatically creates a formula in each each cell. For instance if the first value in the query showed FUNSTUFF, after dumping it into Excel, the contents of the cell would show ="FUNSTUFF". I can just use a find and replace to get rid of the leading =", but sometimes the values of the cells are supposed to have a quotation mark, so using the same method to remove the trailing quote won't work. I need a way to search each cell, check if the last character in the string is a quote, and if it is, delete it.
I would like to query your knowledge database (too much VBA I guess ) as I have a predicament that I cannot seem to solve.
Here is the thing: I am trying to write a sub that would enable me to automatically put in place extensible name ranges (the Offset worksheet function).
The problem is that, despite everything seems to go well, the reference in the name box displays : ="DECALER($C$2;0;0;5-1;1)" (the string comes from a variable and Decaler is Offset in French). These quotation marks are the culprits for sure, as taken off the formula works beautifully.
I've tried everything I've found on the internet, that is to say: Replace(String, Chr$(34), "") so on and so forth, but these marks are not recognized a part of the string so they escape the replacement.
I am having a problem with the correct coding needed for a qotation mark
i wish to place a quotation mark around some text with coding example "TEST" by using the code below this appears fine and looks fine when i save the file, however when i open that file in a .txt file i see """TEST"""
This is the coding i am using and can see it may be where the problem lies
As a data download I got a block ** text with each item enclosed in "" "" and comma delimited. I converted to a table and copied the column I want to a 2003 excel file. How can I remove " " and treat column as simple numeric? I will then have to convert large application to 2007 as I am in that now.
why the following code generates an error if I use the backspace key to clear the textbox?
Code: Dim t As Date If Len(Controls.Item("txtstart").Value) = 4 Then On Error Resume Next t = TimeSerial(Left(Controls.Item("txtstart").Value, 2), Right(Controls.Item("txtstart").Value, 2), 0) On Error GoTo 0 ElseIf Len(Controls.Item("txtstart").Value) = 5 Then On Error Resume Next
why this is causing an error upon opening the file. This workbook has a userform with a listbox (single list, single selection), and when I have the ControlSource property set it causes an error upon opening the userform (which opens when the file is opened), whereas if I do not have the ControlSource property set to anything, it seems to work fine.
Interestingly, if I set the file up to not open the userform with the file, and instead have the userform open when a worksheet control such as a command button is clicked, it doesn't seem to matter if the ControlSource property is set or not. The workbook in question is attached.
-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 have a spreadsheet which has 3 separate external queries running from worksheet 'A'. My user enters a couple of dates in another worksheet 'B' to supply the date parameters for the query and a macro runs to refresh all of the queries and performs a few calculations.This works fine. The trouble is I don't want the user to be able to view all the data on sheet 'A' only the summary on B. My macro ends up on sheet B but whilst the query is refreshing the raw data is displayed to the user on sheet 'A'. When I hide the sheet 'A' i get a run time error '1004' Select method of worksheet class failed.
I have just signed up to the forums as I am having a very specific problem. I have looked on google and used the search feature (on several forums!) and found very limited information that is useful to me. I am having trouble with a very simple few lines of code in a macro. The code looks like this:
Function startmarketIDs() Dim targeturl, writerow, readrow, textmass, xmlHTTP targeturl = "http://lite.betfair.com/ Events.do?s=00010913z" Set xmlHTTP = CreateObject("Microsoft.xmlHTTP") xmlHTTP.Open "GET", targeturl, False xmlHTTP.send MsgBox xmlHTTP.StatusText textmass = xmlHTTP.responsetext MsgBox textmass End Function
My problem occurs at the line "textmass = xmlHTTP.responsetext". The responsetext command is obviously causing problems because if I remove it, the code executes without error and the "xmlHTTP.statustext" says "OK". With the responsetext command left in, the code generates the following error: Run-time error '-1072896658 (c00ce56e)': System Error: -1072896658. If I change the targeturl to www.betfair.com, the code executes fine and I get a message box (as desired) with the source code of the website displayed. Without meaning to sound like Im answering my own question (!!), perhaps there is something about the url or the way in which I am using the xmlHTTP object that is causing the issue, I wondered if someone would mind inspecting my code and perhaps pointing me in the right direction?
I have my columns set at a certain width, the cells set to Wrap Text, the Row set to Autofit YET sometimes when I add text, the hashmarks show up as if the cell isnt formatted correctly and Excel cant show all the text. I can resize the cell, change the text whatever, nothing changes. The only way I can fix this is to cut the text out, open a separate worksheet, paste the text into a cell and copy the whole cell BACK into the original spreadsheet, then I have to reformat the text, whereupon it behaves as it is supposed to.
I read about a similiar problem and the reply was that a macro might be causing the error. This is not the case here. This doesnt happen with any regularity so it is very difficult to figure out.