Don't see why VBA compiler says --> Compiler error Expected:"="

Semanon

New Member
Joined
Dec 5, 2013
Messages
7
Hi,

I would expect this is it was regarding a 'function' call but it's for a 'sub'. I'm trying to execute "createSomeLunchBreaks "...


Code:
            If (agentsOnBreak \ 13)  < Num_Agents_Per_Break Then
             
                createSomeLunchBreaks (lunchDuration, _
                                         agentRow, dateCol, _
                                         longLunchAgents, theName)

This is the sub that is executed by above ...

Code:
Sub createSomeLunchBreaks(lunchDuration As Integer, _
                                agentRow As Integer, _
                                dateCol As String, _
                                longLunchAgents() As String, _
                                theName As String)
   
    If break_length = longLunchDuration Then
        addLongBreak
    Else
        addShortBreak
    End If
        
End Sub



Any clues much appreciated :)
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Remove the brackets in the call to the sub.
Code:
         createSomeLunchBreaks lunchDuration, _
                                         agentRow, dateCol, _
                                         longLunchAgents, theName
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,352
Members
449,080
Latest member
Armadillos

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