Questions tagged as 'vba'

1
answer

VBA: Filter multiple items of a PivotTable containing certain text

I am trying to run a code that filters all the items in a PivotTable that contain a certain text. I figured that just using asterisks (*) before and after mine keyword would get results, but VBA reads asterisks as literal characters. How do I fi...
asked by 21.03.2017 / 15:18
1
answer

Refresh all PivotTables when selecting a Worksheet

I need all the pivot tables in my worksheet to be updated every time I select one of my worksheets that serves as a dashboard. I used the most logical code, but I think something is missing, since the macro does not run, since it returns "compil...
asked by 25.03.2017 / 14:38
1
answer

Rename a variable and update it for the remainder of the project

Is there any easy or automatic way to update the rest of your code when renaming a particular variable in the Dim line? What I have: Dim ABC As String If Range("A2").Value = 1 Then ABC = Range("C2") & ".xls" ElseIf Range("A2"...
asked by 25.03.2017 / 16:34
1
answer

Concatenate Userform texts and insert as a link in a cell

I am trying to feed a table with 3 information entered from the execution of a Userform and, at the end, make a direct hyperlink in the cell with the information entered. The information is as follows: Path to a certain folder (textbox) Th...
asked by 25.03.2017 / 15:50
0
answers

CANCEL -VBA property

How to close the CANCEL property on the exit event of a TextBox? Is that the Textbox is inside a Frame, along with another 5, in the event "exit" was assigned the value True to the CANCEL property if the textbox is empty, but when I click on a "...
asked by 07.03.2017 / 22:43
0
answers

I need to select ranges concatenating addresses in VBA

I have a sub in VBA that does several calculations to get into an address list of ranges     listAddresses="$ A $ 1, $ H $ 3, $ V $ 1, $ M $ 16, $ A $ 21, $ B $ 13, $ H $ 88 ..... $ T $ 44" With this list I need to select all ranges. So I trie...
asked by 06.03.2017 / 12:55
0
answers

Import spreadsheet charts for userform (excel vba)

I have to import 3 graphics to a userform. I even got it, but it started to make mistakes, so I put the code "On Error Resume Next" (but this is not a solution, it just does not lock my form anymore, but it does not do what it should do). At the...
asked by 05.03.2017 / 05:23
1
answer

VBA Doubt - Forms

Good morning. How to format the CPF field in the figure below? Thankful     
asked by 13.02.2017 / 15:29
1
answer

Excel VBA - How to use VLookup with Letters and Numbers to Delete Rows?

Hello! I'm experiencing great difficulty with a problem using VLookup in Excel VBA. First of all, I am not VBA expert but I have been able to use VLookup but I am not having the effect I would like. I will explain below with more detail the situ...
asked by 07.02.2017 / 15:59
1
answer

Import workbook from another worksheet into a new workbook in the current worksheet

Using the example passed on Microsoft MSDN, the following error appears:    Run-time error '9': Subscript out of range VBA Code: Sub Principal() Dim PathName As String Dim Filename As String Dim TabName As String Dim C...
asked by 18.03.2017 / 23:42