First time here, i usually resort to google (but for the first time in 3 years he (or she) cant help me) ... Im making some software that generates html reports which can be viewed within the program and they're exported with bookmark links so that when you click a link (bookmark) it adds the bookmark to the end of the address (changes the window to http://address/file.html#timmy) as this happens the program realises the address has changed so it grabs the new address and sticks it into a string ... i then want to strip that string anything before and including the #.
so in this case i want to be left with the word timmy
(in actual terms, this well be a membership number not a name but it shouldnt make any difference )
i have this, but it keeps returning nothing. Perhaps it'll give you something to work with ...
Expand|Select|Wrap|Line Numbers
- Public Function DeleteString( _
- ByVal vString As Variant _
- , Optional ByVal vStartPos As Variant _
- , Optional ByVal vLength As Variant _
- ) As Variant
- End Function
- Public Sub addresschange()
- Dim address As String
- Dim membername As String
- address = web.LocationURL
- findbm = "#"
- thename = InStr(address, findbm)
- membername = DeleteString(address, 1, thename)
- MsgBox membername 'membername is null ??
- end sub