Specialcells Property Error "Unable To Get The SpecialCells Property Of The Range Class"

Apr 14, 2007

Having problems with trying to get my vba code to access the SpecialCells property. Receiving the following error.... Unable to get the SpecialCells property of the Range class. The section of my code is below that is causing the error. Keeps stopping on the "Selection.SpecialCells(xlsCellTypeVisible).Select" line.

I am using this code (below) to hide certain rows or columns depending on what number is entered. Everything is working fine and I am at the point where I would like to share this excel sheet with others but I would like to lock certain cells so that others cannot alter the formulas. As soon as I lock the cells and then enter values into the unlocked cells, I get the "run-time error '1004': Unable to set the Hidden property of the Range class".

I am receiving the error "unable to get the find property of the range class" in my code. I have attached my code and highlighted red where my error is occuring.

On Error Goto ProductionRptEngineListExport_Error Dim objWrkTmp As Excel.Workbook Dim ObjWrkshtActive As Excel.Worksheet Dim objWrkshtTmp As Excel.Worksheet Dim RngStart As Excel.Range Dim CurrentRowNum As Long, RowCnt As Long Dim GroupRowNum As Long, ColCnt As Long Dim chtChart As Excel. chart Dim intwrktmp As Integer, intwrktmpTot As Integer, intLastRow As Long Dim sngwrk As Single

It is working fine and it does not allow the user to view the locked cells B17:B24 while protection is on.

I have a RadioButton1 on the same Sheet1 and i put the following code behind the button to hide the 4 up to 10 rows. When i will press the button while password protection is on; it is giving me the following error:

I keep getting that error when I'm running my macro. When I debug, it points me to the bolded line in the code below. The larger macro I'm running this function in runs this function some 101 times without error before this happens.

The values of the parameters are as follows when it gives me the error: Find_Exact("hchen", ws1, "B:B"). The first parameter is the only one that changes in the previously mentioned running of this function.

This worksheet was built for use of many users so this sheet is PROTECTED.The user is instructed to copy/paste information from our internal web into the selected areas in the worksheet.When i UNPROTECT the worksheet the VBA works fine.

The data in the worksheet spans from columns A to P, and the length (# of records) is variable.

I am using the below code to unloock certain columns based upon a value in cell a1. The value is the previosu month end date. It was working, but now I am getting " run-time error 1004 Unable to set the locked property of the range class" Can anyone help me to fix the error.

I use Excel 2010 andexample.xlsx cannot make my code working because of the so famous errore above.

I have several pivot tables (pt) in different worksheets (ws), and a list of items stored in an array I created. I've written a macro for setting ON all items in pt except those ones in the array (listOffnet within the code). Everything works properly.

Now, I would like to do the complementary action: setting OFF all items that are not in the array. Unfortunately, I get the error at line:

I am getting the following error when i am clicking a Button on sheet1 which is generating duplicate of sheet1.I am trying to delete the button when duplicate is created..Error is:" run-time error '1004' Unable to get the buttons property of the worksheet class" at this line in code"ActiveSheet.Buttons("CmdHistory").Delete"

I get a runtime error '1004' when I make my combo box selection. I don't have any security or password protection type stuff. The combo box is part of a more complicated spreadsheet and I don't want to switch to a data validation type drop down and I really want it to be activeX.

I have recently tried to implement the password protect from viewing code from this site. It worked brilliant on a basic spreadsheet, but when I tried to implement it on a worksheet with links I keep getting the error:

Run-time error '1004'Unable to set the hidden property of the Range class

I'm looking to loop a comparison code. I'm using dynamic referencing (using x and y) to find maximum values for specific time intervals. The code works on a cell to cell basis, meaning if I input the formula and change the cell referencing manually then the equation will give the desired results. However when I attempted to create a VBA code to speed up the process I kept getting a 1004 Unable to set FormulaArray Property of the Range Class error, I later figured out that the Formula Array function is limited to a certain number of characters so I split up my function into 3 different string formulas. I still get the same error.

I am having trouble with a macro for unprotecting a sheet keeping specific cells locked then clearing contents of other cells then reproect the sheet. I wrote one for one sheet which works and I have re used this but it keeps saying Unable to set the Locked property of the Range class.

I've been using the following code successfully for years. Today I would get the error 1004:Unable to set the visible property of the worksheet class. All my searches came up with someone not realizing they had protected the workbook. As you can see, the first thing I do before trying to set the worksheet visible is to unprotect the workbook. In frustration and on a lark I tried .Sheets("items").Visible = True and it worked. These kind of intermittent errors in Excel VBA are very frustrating. Can anyone tell me what I am doing wrong?

I am trying to look at column at of two different workBOOKS and then when a match is found take the value from column D in workbook two and copy it to the corresponding row in the current column of workbook one.

this is the code I'm using and I get that unable to get the vlookup function. I thought maybe it was because not all of them will have matches so it could return an error if it is trying to return empty, so I put int on error resume next, and it ran through but never brought over ANY data, and there ARE matches and data to be brought over.

destRng is the range in the current column(that i just inserted) on the active worksheet that we will be putting the new info into. srcRng is the range in column A on the other workbook that the numbers are being compared to. src is just an integer

The sheet is not protected, events are disabled, and the range that gets selected changes dynamically based on the number of rows of data in the table, however in this example cells A3:L15 are selected.

I made a macro to plot several line graphs on two axis (up to 5) side by side. I made the macro open up the files i need, and extract the necessary data into a common workbook. I put the common element, time as the x axis and heat as one y axis and pressure as the secondary axis. The source data on the excel worksheet is as follows:

I have been working on this small project and I it works to create checkboxes and check what boxes are checked. However, at the end of checking which boxes are checked there is a pop up error message saying Run-Time error '1004': Unable to get the CheckBoxes property of the Worksheet class. These are the lines of code, where is the error?

I have a UserForm with one ComboBox and one TextBox. The ComboBox is populated from another sheet with product codes in Col A and names in Col B. When the user selects a product code from the ComboBox the respective name appears in the adjacent TextBox. Once both boxes have been filled the user can then save the data to a third sheet. Now the problem arises when the user tries to manually enter a code into the ComboBox that does not appear in its rowsource - VBA states a run-time error and my new keyboard goes flying out the window again. Attached is an example sheet

For the last day I have been getting the following error: "Run-time error '1004': Unable to set the Xvalues property of the series class."

The archetecture of the marco is sound being that I have used this methology in another macro and it works correctly every time. The XValuesand Values range are also correct and I know this because I had the macro select the data cells and it does this correctly as well. The data for simplicity at the moment has no empty cells or abnormal data. The data cells are all filled with some kind of data. For the XValue Range the data would look something like "2070087 4/27/2007" and the Values range is filled with a number between 0 and 100. What I can't figure out is why it crashes with a valid establish range. I highlighted the lines it crashes on in read, they are near the bottom.