Tommy, will it not allow me to write to a specific drive? At work, our personal drives are I:\, so I changed it to my needs (below) but it doesn't seem to be writing a myPlacement.ini file at all.
Sub SaveSettingIni(iToolBar As CommandBar) Dim DirLoc As String DirLoc = "I:\" With iToolBar WriteIniValue DirLoc & "myPlacement.ini", "Settings", "Position", _ CStr(.Position) WriteIniValue DirLoc & "myPlacement.ini", "Settings", "RowIndex", _ CStr(.RowIndex) WriteIniValue DirLoc & "myPlacement.ini", "Settings", "Left", CStr(.Left) WriteIniValue DirLoc & "myPlacement.ini", "Settings", "Top", CStr(.Top) End With End Sub Sub ReadSettingIni(iToolBar As CommandBar) Dim DirLoc As String DirLoc = "I:\" With iToolBar .Position = Val(ReadIniValue(DirLoc & "myPlacement.ini", "Settings", "Position")) .RowIndex = Val(ReadIniValue(DirLoc & "myPlacement.ini", "Settings", "RowIndex")) .Left = Val(ReadIniValue(DirLoc & "myPlacement.ini", "Settings", "Left")) .Top = Val(ReadIniValue(DirLoc & "myPlacement.ini", "Settings", "Top")) End With End Sub




Reply With Quote