excelstarter1
Board Regular
- Joined
- Jul 20, 2017
- Messages
- 81
Hey guys,
I really get a headache with the resizing of single or multiple colums with VBA in Excel. I already read a lot about how Excel determines sizes and how one could cope with the sizing issues (e.g. https://support.microsoft.com/en-us...-of-how-column-widths-are-determined-in-excel or Excel VBA Column Width: Step-by-Step Guide and 8 Code Examples).
However, I just don't get it. The problem is with the use of tables (created in Excel) in a PowerPoint presentation.
For example, I want to create a table in Excel which I want to use in a PPT presentation. The table should have the exact size of 13.50 cm in PowerPoint (not 13.52 or 13.48, but 13,5cm).
Lets say I want to create a cell/column in Excel with VBA that has the size equivalent in PowerPoint of 13.50 cm. In order to do that I would resize the colum in Excel to 72.14 (510 Pixel). The normal style of my workbook is Arial 9. This gives me 13.52 cm (copy and past a picture) in PowerPoint (so not even the 13.50 cm which I want). If I change it to 72.00 (509 Pixel) I end up with 13.48 cm in PowerPoint. Strange, I just cannot get the desired 13.50 cm. Why?
Now if I want two columns I would assume that each column should have the width of 36.07 (half of 72.14). However, it needs to be 35.71 each in order to sum up to a total of 13.52 cm in PowerPoint. With regard to pixel it his half, i.e. 255 Pixel. Just why?? I don't get it. I resize charts by using e.g.:
Is this the wrong approach? How do I have to resize charts in order to get the desired size equivalent I want in PowerPoint?
Thanks in advance guys! Hope you can shed some light on this confusing topic.
Regards
I really get a headache with the resizing of single or multiple colums with VBA in Excel. I already read a lot about how Excel determines sizes and how one could cope with the sizing issues (e.g. https://support.microsoft.com/en-us...-of-how-column-widths-are-determined-in-excel or Excel VBA Column Width: Step-by-Step Guide and 8 Code Examples).
However, I just don't get it. The problem is with the use of tables (created in Excel) in a PowerPoint presentation.
For example, I want to create a table in Excel which I want to use in a PPT presentation. The table should have the exact size of 13.50 cm in PowerPoint (not 13.52 or 13.48, but 13,5cm).
Lets say I want to create a cell/column in Excel with VBA that has the size equivalent in PowerPoint of 13.50 cm. In order to do that I would resize the colum in Excel to 72.14 (510 Pixel). The normal style of my workbook is Arial 9. This gives me 13.52 cm (copy and past a picture) in PowerPoint (so not even the 13.50 cm which I want). If I change it to 72.00 (509 Pixel) I end up with 13.48 cm in PowerPoint. Strange, I just cannot get the desired 13.50 cm. Why?
Now if I want two columns I would assume that each column should have the width of 36.07 (half of 72.14). However, it needs to be 35.71 each in order to sum up to a total of 13.52 cm in PowerPoint. With regard to pixel it his half, i.e. 255 Pixel. Just why?? I don't get it. I resize charts by using e.g.:
Code:
Selection.ColumnWidth = 10
Thanks in advance guys! Hope you can shed some light on this confusing topic.
Regards
Last edited: