Our training courses

Other training resources

Our training venues

Why we are different

Details for Costas

Costas has participated in the following threads:

Added by Costas on 21 Mar 2022 at 14:08


What is the difference between the function syntax used in the video: 

def FunctionName(Parameter: DataType) -> ReturnDataType:

      return [expression]

and the "usual" syntax:

def FunctionName(Parameter): 

      return [expression]

Is it just a more detailed coding syntax for clarity purpuses or there are other reasons/benefits that make it preferable for someone to use it?


Added by Chandra on 17 Feb 2022 at 12:32

It has not activated, please be let me, what do I do?

At line:1 char:1
+ .\Activate.ps1
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException   
    + FullyQualifiedErrorId : UnauthorizedAccess
PS I:\Wiseowl-Python\Tutorial\scripts>

Added by Costas on 07 Sep 2018 at 10:21


What can we do If the URL does not include the specific structure to concatenate the parameters and select specific values from a table? For example the URL for Google Finance bellow:


Thanks in advance for the assistance.

Added by Costas on 29 Aug 2018 at 08:03

Hi, I would appreciate your advice on the following code. It might be very simple but I dont see it. Why it gives me an application or object defined error when I reach the underlined line in the code below?

Dim WS As Integer
    Dim WSCounter As Integer
    Dim WSPV As Long
    Dim SumPV As Long
    Dim Period As Range
    Dim TotalPeriods As Range
    WSCounter = Worksheets.Count - 1
    Set TotalPeriods = Range("A2", Range("A2").End(xlDown))
    For Each Period In TotalPeriods
        For WS = 1 To WSCounter
            WSPV = WorksheetFunction.Sum(Worksheets(WS).Range(Period))
            SumPV = SumPV + WSPV
        Next WS
        Worksheets("Sheet1").Range("A2") = SumPV
    Next Period

Thank you in advance for the help.

Added by Costas on 05 Oct 2017 at 08:56


I was wondering, can I apply a property to all selected worksheets when I am in a group mode? For example below the property interior color is applied only to Sheet 1 even if I have selected 2 worksheets. Why is that? 

Sub SelectWorksheetsAndApplyProperty()

    Selection.Range("a1:a5").Interior.Color = rgbBlue
End Sub

Thanks in advance for the answer.


Added by Costas on 26 May 2017 at 13:29


I have a Userform with a text box that tries to find a specific number (from 1 to 200) when I press a button. The text box has as property text=1. After seeing the video, I thought for such a search to use the Find method. However even if the line below works with any other number, when I use the number 1 it finds the number 10? I made the same test with numbers 2 & 20 & 200 but there was no problem with them.

Range("A5:OI5").Find(What:=TxtBxMapNumber.Value, LookIn:=xlValues, MatchCase:=True).Select

What is wrong with number 1?  Thanks once more for your assistance.

Added by Costas on 03 May 2017 at 16:20


Since I am new in VBA, I would appreciate your assistance. As in your video example, I am trying to loop through each worksheet and each cell in a range of cells by using nested For Each....Next loops. What is wrong with the "SingleWorksheet.ListOfCells" line in the code below?

Sub ForEachSelect()

Dim SingleWorksheet As Worksheet
Dim SingleCell As Range
Dim ListOfCells As Range

Set ListOfCells = Range("a1", Range("a1").End(xlDown))
    For Each SingleWorksheet In Worksheets
        For Each SingleCell In SingleWorksheet.ListOfCells
        Next SingleCell
    Next SingleWorksheet
End Sub


Thanks in advance for the help.

Added by Costas on 24 Apr 2017 at 11:26


I was wondering if you could help with the following question. Why the Do Loop stops when it comes accross a value of 0 in a table with integer numbers? How can I handle such a case?

Thanks in advance for the help.


Head office

Kingsmoor House

Railway Street


SK13 2AA


Landmark Offices

99 Bishopsgate




Holiday Inn

25 Aytoun Street


M1 3AE

© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.

End of small page here
Please be aware that our website uses cookies!
I'm OK with this Tell me more ...