Skip to main content

Posts

Showing posts from September, 2017

Linux list folders recursively

To list all folders on the root directory, type:     ls -d /* Sample Output: /bin     /dev   /smsbackup  /lost+found  /mnt  /proc  /selinux  /tmp /boot    /etc   /lib        /media       /net  /root  /srv      /usr /cgroup  /home  /lib64      /misc        /opt  /sbin  /sys      /var To list all folders on the current folder, one level depth only; type: [xxx@mx var]$ ls -d */ Sample Output: account/  cvs/    games/  local/  lost+found/  opt/       spool/  yp/ cache/    db/     gdm/    lock/  sms/        ...

Word VBA to set x and y chart values

How to set X and Y values in Word VBA chart? How to set vertical and horizontal values for a Word chart using VBA? Code below assumes that you already have the necessary code to generate the chart. This code below will only show how to set the X and Y values for a chart using VBA in a Word document. Here's the code: 'Set value for Y axis or Vertical value   With cht.Axes(xlValue)    .MinimumScale = 0    .MaximumScale = 35    .MajorUnit = 5    .MinorUnit = 0      End With ' Set value for X axis or Horizontal value   With cht.Axes(xlCategory)    .MinimumScale = 0    .MaximumScale = 25     .MajorUnit = 5    .MinorUnit = 0     End With Cheers! Till next time. ================================ Free Android Apps: Click on links below to find out more: Excel Keyboard shortcuts guide h...

VBA Word change graph data point width

If you have been playing with the chart in Word or Excel you might encountered that the point on the graph is quite small. If you need to adjust the data point on Word graph, you have two options do it manually or simply automate it at runtime using a VBA code. Assuming you have all the necessary parameters that creates the graph via VBA, and you just need to adjust the data point you can use the code below, the code below was tested using Word 2016. It may not apply to older versions but I think logic should stay the same. cht.SeriesCollection(1).Format.Line.Weight = 9.75 To do it manually, click on the data point and right click on it and select “Format Data Point”, click the bucket icon and change the width value. Here’s the screen shot using Word 2016: For the sake of completeness, the code will be something like this: Dim shp As Shape Dim cht As Chart   Set shp = ActiveDocument.Shapes.AddChart(xlXYScatterLines)      ...