i have a vba code that saves a range of cells in image format; however, if the PC has a locked screen, the images that are saved are all white:
Range("B6:M80").Select
Selection.CopyPicture Appearance:=xlScreen, Format:=xlBitmap
GifLargh = Selection.Width
GifAlt = Selection.Height
Sheets("Summary").Select
Dim ch As ChartObject
Set ch = Sheets("Summary").ChartObjects.Add(1, 1, GifLargh, GifAlt)
Sheets("Summary").ChartObjects(1).Activate
Worksheets("Summary").ChartObjects(1).Chart.Select
Worksheets("Summary").ChartObjects(1).Chart.Paste
Worksheets("Summary").ChartObjects(1) _
.Chart.Export Filename:="C:\Macro\Summary.gif", FilterName:="GIF"
the same code works perfectly if the screen is not locked: does anyone have a suggestion to solve the problem?