keldsor
Board Regular
- Joined
- Jun 9, 2017
- Messages
- 52
I use this code in Access to draw a timeline and freeze panes in Excel - so the commands are for the Excel enviroment - that's why I'm asking here.
Sometimes it runs into error 1004 in the marked line:
Why ?
and can it be done WITHOUT using ".Select" ?
Sometimes it runs into error 1004 in the marked line:
Code:
Private Sub bygTidslinien(st As Integer, d As Boolean)
Dim xlApp As Object
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet
Set xlApp = GetObject(, "Excel.Application")
With xlApp
.Run "DeleteAllShapes"
.Run "timeLine", txtFra, txtTil, st, d
.ActiveSheet.Cells(5, 5).Select
.ActiveWindow.FreezePanes = True <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< error 1004 ????
End With
AppActivate xlApp.Caption
Set xlApp = Nothing
End Sub
Why ?
and can it be done WITHOUT using ".Select" ?
Last edited: