Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. Private Const myValue = "the answer is 42"
  2.  
  3. Public Function getSecret()
  4. getSecret = myValue
  5. End Function
  6.  
  7. Sub test()
  8. Dim sheetName = "Sheet1"
  9. MsgBox "The sheet says that " & Sheets(sheetName).getSecret()
  10. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement