Cannot seem to figure out this JES error, anyone know? - jython

JES error
Code it's referring to

Looks like you're trying to use the repaint function as a statement. You're missing the parenthesis on the lines:
repaint llama
repaint canvas
They should be:
repaint(llama)
repaint(canvas)

Related

How do I apply bullets to a table column in word using VBA?

I have applied bullets to a row without difficulty using
myDoc.Tables(1).Rows(3).Range.ListFormat.ApplyBulletDefault
but when I try something similar with
myDoc.Tables(1).Columns(4).Range.ListFormat.ApplyBulletDefault
I get the error method or data member not found with "Range" highlighted in vba.
I'm sure I'm missing something straightforward, but any suggestions would be great.
Okay, I've settled on two lines of code as follows in case this come up for anyone else:
myDoc.Tables(1).Columns(4).Select
myDoc.ActiveWindow.Selection.Range.ListFormat.ApplyBulletDefault

VBA DIM a string of TEXT to use as part of a value

I am trying to calculate an abbreviation based on a combobox value to use it as part as a value in another module and for some reason the value doesn't transfer to another module at all.
I have it declared as
Public MachineLetter As String
Above the module in which an if function finds what the actual string should say.
But when I try to reference this MachineLetter in another sub, it doesn't show up. I did try to do the dim and if function inside the actual module in which I currently need it and it did work. So I wonder what's the problem?
Could someone help me finding a solution to this problem?
Check where you've declared MachineLetter, it should be declared in a standard module.
Also, make sure you you haven't accidentally declared it more than once, for example in a function/sub. If you do that then it's value will be 'hidden'.
Finally, make sure you are actually setting it's value.
I tested and no problem. When something fells strange try to put a breakpoint to see better the problem.

Like Functionality for Values in ListBox - VBA Error

I have a listbox, I am trying to select an Item inside it. Inorder to do that, I wrote this piece of code and it works,
With Sheets("Main").Ent_ListBox
.Values = "D2057898897"
End With
But I would like to have something like, .Values Like "D20*" But its giving me a syntax error.
Does Anyone know how to do this? Kindly share your thoughts !

Beginner with OO CLI to generate PDFs and Uno.Any issue in VB.Net

I'm a beginner in writing code that allows us (my company) to generate reports using the OpenOffice DLL allowing the generation of PDFs. I'm using ASP.NET, writing in VB. I need to be able to modify the cell of a table using the xPropertySet member/functions. So I have a variable named Property which is of the the xPropertySet and references the cell that I want. I'm assuming that I need to use the setPropertyValue function but I'm not entirely sure what arguments I should give it. The end result I want is the following:
Description: ________________
I need to figure out how to make the cell that I have above with the underscores just a border on the bottom. Because I'll have some fields that will be pre-populated. As a test I tried doing objCell.Property.setPropertyValue("CharColor", 255), but I get an error saying that Integer cannot be casted to an uno.Any type. Which, unfortunately I know nothing about. Any help would be greatly appreciated. Thank you.
Alright, sorry all I figured it out finally. All I did is created a border variable of type BorderLine like follows
Dim border As New unoidl.com.sun.star.table.BorderLine
Then I set the outerWidth like so:
border.OuterLineWidth = 1
Then I use the setPropertyValue method for the specific cell that I need So something like this:
objCell.Properties.setPropertyValue("BottomBorder", New uno.Any(border.GetType, border))
Of course Properties between ObjCell and Properties is the xPropertySet of the cell. Anyway, hope this helps someone else.

Changing line transparency of a series without affecting marker transparency in Excel VBA

I am writing a macro in VBA for excel in which I would like to change the transparency of the lines connecting markers in a series but leave the transparency of the markers in the series the same.
To specify: the chart is a scatter plot. I would like the markers for a series to be opaque/zero transparency and for the lines in the series to be 75% transparent.
I have adjsuted the transparency of the lines by using
myseries.format.line.transparency = 0.75
but this changes the marker transparency as well.
does anyone know of a way I can change the transparency of the two separately? I imagine there is a member/property to do what I want, but I cannot find it.
thanks in advance for any help!
This answer isn't going to make you very happy.
I've looked into this before and the information i've gotten is that this simply isn't a parameter that you can specify through VBA. It looks like you can access marker style, size, background color and foreground color, and that's about it.
Maybe MS didn't think anyone would ever want to mess with that.
One thing you could try is applying a custom chart format, but if you have variable numbers and/or orders of series then that may not work.
mychart.ApplyChartTemplate ("filepath\filename.crtx")
Something like that, where mychart is already set equal to the chart you want to format.
Again, maybe not of any use to you, best i could think of.
You guys didn't dig hard enough.
SeriesCollection(i).Format.Line.Transparency
will work if the SeriesObject is in a certain state. The original 'automatic' line style state prevents this vba from doing anything at first, but if you simply precede it by setting certain other properties on the line format first, then the transparency will take. The following worked for me:
For Each obj In myChart.SeriesCollection
obj.Format.Line.DashStyle = 1
obj.Format.Line.Transparency = 0.65
Next obj
DashStyle = 1 sets the line style to 'Solid' (as opposed to dashed, dotted, etc.) and has the side effect of freeing up the series format to have the transparency set. I don't know for sure why it works, but it does.
Sorry, my mistake. I read the question slightly wrong.
I find that if I start the line with no markers, then turning transparency separately doesn't turn the markers on and off.
Try this:
activechart.SeriesCollection(1).format.fill.transparency=0.5