Skip,
I will try what you told me but now I found a second best way of handling it. I cut and pasted a chart to another sheet where I can easily set up buttons. I couldn't believe that the charts functioned well. I thought as I copied the charts, the data behind the charts would be gone but...
Hi,
I tried to add a button on a pivot table chart (like RETURN or GO BACK) but failed because the Excel wouldn't let me.
Is there any way we can make it doable?
Thanks and happy holidays.
jqzhang
Hi, guys,
It's good and bad. Good thing is both ways are working, lower case or upper. Bad thing is I will have '1004' error. Another thing that I don't get. If no '1004', none of the code will be working; '1004' gives me the right output. However, if I change the criteria from '<>MA' to '<>M2'...
I tried to delete some rows based on the values of cells but literally I don't know why it's not working. When I ran the Sub, all the rows were gone. That was not what I want.
Please take a look. (it works when the criteria are like numbers, not characters)
Thanks in advance.
jqzhang
Sub...
Hi,
I have about 20 work books and each has only one sheet in it. What I am planning to do is to bring in the data in the 20 sheets from the 20 books and concatenate (append) them in a single sheet.
Here is the code but not working. It looks like it copies only the first sheet and halted. The...
Skip and Glenn,
Thanks a lot. It works now since I fixed the name of the button. You were right and I was wrong.
By the way, what about the second question. The first field, State, won't show but the rest of fields in the criteria are OK.
I know it's difficult for you to understand what I am...
Hi,
The following code is to select or filter data by clicking a button based on some criteria:
*****************************************
Private Sub CommandButton_Click1()
Application.EnableEvents = True
Dim wsD As Worksheet
Dim wsC As Worksheet
Set wsD = Worksheets("Target Sheet")
Set wsC =...
PHV,
I got 'Run-time error 1004' using your code if
Range("A1:A8").AutoFilter ...
If I change to
Range("A1").AutoFilter ... then the error is gone but the data I got is not clean: Col. 7 ends up with most of the rows satisfy the condition, but a few not; the same is true for Col. 8.
However, if...
Sorry but I wasn't specific enough.
I want to delete the rows in which Field 7 has values greater than 16k or less than 9k; and Field 8 has values lower than 800 or greater than 1000.
Hope have made myself clear.
Thanks.
jqzhang
Could you check for me see why the second condition not working:
Sub ConditionalDeleteRows()
On Error Resume Next
Range("A1").AutoFilter Field:=7, Criteria1:="<9000", Operator:=xlOr, Criteria2:=">16000"
Range("B1").AutoFilter Field:=8, Criteria1:="<800", Operator:=xlOr, Criteria2:=">1000"
If...
Skip,
Thanks for the quick return.
But I got errors like 'Run-time error 438: object doesn't support this property or method'. The code is too much for me and no way for me to fix it.
Thanks again.
jqzhang
I wrote a macro to search and change the captions of command buttons:
Private Sub fixcap()
If InStr(CommandButton1.Caption, "ABC") Then
CommandButton1.Caption = Application.Substitute(CommandButton1.Caption, "ABC", "ZZZ")
ElseIf InStr(CommandButton2.Caption, "AHY") Then
CommandButton2.Caption =...
Gerry,
Sorry I didn't make myself understood!
It's a file with the extension of 'gif' that can be opened with MS Photo Editor, which I am not familiar with. The picture looks like the one on the left of this very webpage: the one with a horse in it with the label 'TEK-TIPS FORUMS' and so on.
My...
Hi,
I have an Excel Workbook with about 50 sheets. Each sheet has a colored picture logo at the northeast corner of the sheet. I'd like to modify or change the text contents of the picture for all 50 sheets. Can I set up a macro that changes the way I want for all the sheets in a couple of...
Hi,
I have a Excel WorkBook with about 40 tabs hidden. Everytime when I try to unhide some of the sheets, I will have a pretty hard time looking for them because the list of the hidden files are not sorted.
So my question is does anybody have a ready-made macro that can sort the list everytime...
PHV,
I have a similar question and will be appreciative if you can give me an answer.
I tried to change CommandButton.Caption from 'ABC' to 'XYZ' and I have 10 buttons on a sheet and I have about 50 sheets. I used this one for a single sheet and it gave me message like 'Object required'...
PHV,
Thanks a lot, PHV! It works really well. You're great in VBA, at least. I have tons of questions and hope I can bring them up to you.
Take care!
jqzhang
PHV,
Thanks for the quick return! But I tried the similar way before and I'd got the same errors as I tried yours:
Run-time error "438"
Object doesn't support this property or method
Take care!
jqzhang
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.