PDA

Click to See Complete Forum and Search --> : Save property to be edited in a variable?


FFSoftPres
Aug 24th, 2001, 12:57 PM
I'm writing a program where the property that will be changed will vary but all the other code will not. I'd like to write a subroutine, but how do I pass a subroutine what property of the object to edit. Is this possible to do without assigning a string "FontBold" or something and then doing a case statement in the subroutine to determine what property to modify? I'm going to be working with around 30 properties so I don't want a huge case statement. Any help would be greatly appreciated. Thanks in advance :)

mlewis
Aug 24th, 2001, 02:22 PM
Well... you can do it but it requires you to start crapping with the workings of COM and poking stuff into memory... not good ground. Make one bit wrong and the whole machine will be toast. Reboot two or three times to clean up the residual errors...hope your hard drive doesn't get corrupted...........not fun/unless yur sadistic and masochistic and whatever other weird disorders there may be.