Attribute VB_Name = "basCondComp" Option Explicit Public Function GetCondComp() As String '+ ' Save the Clipboard Data. Method not provided '- SaveClipboardData '+ ' Clear down the clipboard '- Clipboard.Clear '+ ' Send the appropriate key sequence to ' o Bring up the project properties dialog (Alt-P E) ' o Switch to Make tab (Ctrl-TAB) ' o Move to Conditional Compilation text box (Alt-D) ' o Copy text into paste buffer (Ctrl-C) ' o Cancel Dialog (ESC) '- SendKeys "%(p)e^({TAB})%(d)^(c){ESC}", True '+ ' Set return text from function '- GetCondComp = Clipboard.GetText '+ ' Restore the Clipboard Data. Method not provided '- RestoreClipboardData End Function Public Sub SetCondComp(ByVal strCondComp As String) '+ ' Save the Clipboard Data. Method not provided '- SaveClipboardData '+ ' Clear down the clipboard '- Clipboard.Clear '+ ' Put the new text into the paste buffer '- Clipboard.SetText strCondComp, vbCFText '+ ' Send the appropriate key sequence to ' o Bring up the project properties dialog (Alt-P E) ' o Switch to Make tab (Ctrl-TAB) ' o Move to Conditional Compilation text box (Alt-D) ' o Paste text into text box (Ctrl-V) ' o Accept dialog (ENTER) '- SendKeys "%(p)e^({TAB})%(d)^(v){ENTER}", True End Sub