excel vba - Replacing a variable in vba powerpoint -


i trying replace , save integer in vba powerpoint.

i have variable in 1 subroutine named projectid. @ moment, variable set 617. in subroutine running user input method prompts user new projectid , stores new projectid replace "617". issue projectid go 0 when close powerpoint , reopen it.

is there way physically replace code projectid = 617 projectid = 699 example.

below code im working with, notice projid global veriable:

    dim projid integer 

sub changeprojid()     dim strprojid string      dim intprojid integer      strprojid = inputbox("enter project id given example:", "project id input")      on error goto notvalidid     intprojid = cint(strprojid)     projid = intprojid     msgbox " new project id set " & intprojid & " until changed again"      exit sub  notvalidid:      msgbox " must enter valid integer"      end sub 

public sub commentconnect(control iribboncontrol)       dim url string     projid = 617     url = "example.com/prid="       activepresentation.followhyperlink (url & projid)  end sub 

freeman's got right idea ... store value in non-volatile memory.

luckily, powerpoint has feature that's perfect this: tags.

with activepresentation   .tags.add "projectid", cstr(intprojid) end 

the string version of intprojid permanent "tag" attached presentation object. retrieve it:

msgbox activepresentation.tags("projectid") 

each presentation, slide , shape can have pretty many of these tags like.


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -