简体   繁体   中英

Understanding the elements of a VBA statement

I've been recently given an Excel worksheet with VBA coded into it. Currently I am studying it to try and understand how it works. However, I stumbled upon a function called 'runv'.

pdate = Left(ActiveWorkbook.Sheets("ALLOCATION").Cells(runv + 6,5), 6)

Until today, I still can't figure out what 'runv' is and what it's function is. I even tried searching online and all I found are results autocorrected as 'run'. Does anyone knows what it means?

The 6 at the end is the second parameter of the Left() function, which specifies how many characters are extracted from the string in the first parameter, starting from the left. The syntax for Left() is

=LEFT(string, howManyCharactersToExtract)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM