1
我的經驗,打開包含未捕捉到一個細胞畫面對象Excel文件往往遊移,這取決於它在被打開的電腦上。VBA調整屏幕分辨率
我在想,如果有一種解決這種性質的方法,例如用設置的分辨率參數打開excel文件?
我的利用率使用屏幕截圖和單元格將粘貼的圖片重新格式化爲所需的大小。如:
dim rng as range
set shtemp=worksheets.add
Set rng = shtemp.[B14:Q49]
rng.CopyPicture Appearance:=xlScreen, Format:=xlBitmap
shtemp.Shapes("Picture 1").Delete
Range("A1").Select
ActiveSheet.Paste
'Reset the altered cells to normal in order to maintain congruency in picture size alteration
'This line is where I have to re-adjust cell settings to match the computer/screen I am using and capture the needed range.
Rows("49:49").RowHeight = 13.2
Columns("Q").ColumnWidth = 8.11
Set r = Range("B5:T45")
With Selection.ShapeRange
.LockAspectRatio = False
.Top = r.Top
.Left = r.Left
.Width = r.Width
.height = r.height
End With