Dim spclen5 as new string c math.round 30 linelen

I see what you're trying to do!

It looks like you're trying to declare a variable spclen5 as a new string and set its length to 30 using the Math.Round function. However, there are a few issues with your code:

  1. dim is not a valid keyword in VBA (Visual Basic for Applications). Instead, you should use Dim (note the capital "D").
  2. c math.round 30 linelen is not a valid syntax. The Math.Round function is used to round a number to the nearest integer, but it doesn't take a string as an argument. Additionally, linelen is not a valid property or method.
  3. You can't set the length of a string variable directly. Strings in VBA are dynamic and can grow or shrink as needed.

To achieve your goal, you can use the Space function to create a string with a specified length, like this:

Dim spclen5 As String
spclen5 = Space(30)

This will create a string with 30 spaces. If you want to set the length of the string to 30 characters, you can use the Left function to truncate the string to the desired length:

Dim spclen5 As String
spclen5 = Left("your_string_here", 30)

Replace "your_string_here" with the actual string you want to truncate.