I've been having problem produces a "memory xxxxxxx cannot be read" error. All the functions and variables are declared, the file and the controls exist... If it might be of any significance, this is followed by an "End" command, but it doesn't have any problems on its own. Anyway, here's the code:

VB Code:
  1. If optAlbum1.Value = True Then
  2.         Call WritePrivateProfileString("MW Photographer", "Album1Index", GetPrivateProfileInt("General", "Screen Shot Index", "0", CurDir() & "\Morrowind.ini"), CurDir() & "\Morrowind.ini")
  3.     ElseIf optAlbum2.Value = True Then
  4.         Call WritePrivateProfileString("MW Photographer", "Album2Index", (GetPrivateProfileInt("General", "Screen Shot Index", "0", CurDir() & "\Morrowind.ini") - 25), CurDir() & "\Morrowind.ini")
  5.     ElseIf optAlbum3.Value = True Then
  6.         Call WritePrivateProfileString("MW Photographer", "Album3Index", (GetPrivateProfileInt("General", "Screen Shot Index", "0", CurDir() & "\Morrowind.ini") - 50), CurDir() & "\Morrowind.ini")
  7.     ElseIf optAlbum4.Value = True Then
  8.         Call WritePrivateProfileString("MW Photographer", "Album4Index", (GetPrivateProfileInt("General", "Screen Shot Index", "0", CurDir() & "\Morrowind.ini") - 75), CurDir() & "\Morrowind.ini")
  9.     End If