typename

  1. E

    Search code - See any issues?

    found this piece code and its exactly as presented. It works in the provider demo, but not in my new workbook. Error occurs at the bold red print (object define error) Sub search_and_extract_singlecriteria() Dim datasheet As Worksheet Dim reportsheet As Worksheet Dim typename As String Dim...
  2. O

    TypeName function - why is it necessary?

    Guys, why doesn't this code work without the TypeName thing? Sub num() Dim FormulaTest As Variant FormulaTest = Teste.Range("A1:B2").HasFormula If TypeName(FormulaTest) = "Null" Then MsgBox "Mixed" Else MsgBox FormulaTest End If End Sub PS: I have text in A1 and a formula in B2...
  3. S

    Purpose of TypeName in this basic sub routine

    Hi, I'm learning VBA via a book and have come across the following code which I do not fully understand how it works Sub SqrRootEg() Dim Cell As Range If TypeName(Selection) <> "Range" Then Exit Sub For Each Cell In Selection Cell.Value = Sqr(Cell.Value) Next Cell...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top