Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 295
Default Quotation Marks

Blimey, I'll bet I'm not the first to trip up on these! After two hours, I
give in and defer to your superiority!

Using a subroutine I want to create a formula in (say) cell A1. I want the
formula in the cell to read:
=HYPERLINK("C:\1. ACTIVE CLIENTS\Duke, E","Duke, E")
but the thing is that Duke, E is a variable.

This is set by coding
client_folder = surname & ", " & initial

I know that this works:
Cells(pasterow, pastecol).FormulaR1C1 = "=HYPERLINK(""C:\1. ACTIVE
CLIENTS\Duke, E"",""Duke, E"")"

so now I need the code to replace Duke, E with client_folder. Help
me, pleeeeeeeeeeeease!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Quotation Marks

=HYPERLINK("C:\1. ACTIVE CLIENTS\"&client_folder,client_folder)


--
__________________________________
HTH

Bob

"Brettjg" wrote in message
...
Blimey, I'll bet I'm not the first to trip up on these! After two hours, I
give in and defer to your superiority!

Using a subroutine I want to create a formula in (say) cell A1. I want the
formula in the cell to read:
=HYPERLINK("C:\1. ACTIVE CLIENTS\Duke, E","Duke, E")
but the thing is that Duke, E is a variable.

This is set by coding
client_folder = surname & ", " & initial

I know that this works:
Cells(pasterow, pastecol).FormulaR1C1 = "=HYPERLINK(""C:\1. ACTIVE
CLIENTS\Duke, E"",""Duke, E"")"

so now I need the code to replace Duke, E with client_folder.
Help
me, pleeeeeeeeeeeease!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 295
Default Quotation Marks

Hi Nigel
this doen't work (from Bob)
Cells(pasterow, pastecol).FormulaR1C1 = "=HYPERLINK("C:\1. ACTIVE
CLIENTS\"&client_folder,client_folder)"

and this doesn't work
Cells(pasterow, pastecol).FormulaR1C1 = "=HYPERLINK("C:\1. ACTIVE
CLIENTS\" & client_folder & "," & client_folder & ")""

Brett



"Nigel" wrote:

=HYPERLINK("C:\1. ACTIVE CLIENTS\" & Duke & "," & E & "," & Duke & "," & E
& ")"

But better use the created client_folder name string and then use that....

=HYPERLINK("C:\1. ACTIVE CLIENTS\" & client_folder & "," & client_folder &
")"

--

Regards,
Nigel




"Brettjg" wrote in message
...
Blimey, I'll bet I'm not the first to trip up on these! After two hours, I
give in and defer to your superiority!

Using a subroutine I want to create a formula in (say) cell A1. I want the
formula in the cell to read:
=HYPERLINK("C:\1. ACTIVE CLIENTS\Duke, E","Duke, E")
but the thing is that Duke, E is a variable.

This is set by coding
client_folder = surname & ", " & initial

I know that this works:
Cells(pasterow, pastecol).FormulaR1C1 = "=HYPERLINK(""C:\1. ACTIVE
CLIENTS\Duke, E"",""Duke, E"")"

so now I need the code to replace Duke, E with client_folder.
Help
me, pleeeeeeeeeeeease!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 295
Default Quotation Marks

Hi Bob, I tried that and also Nigel's sugestion. These are what I tried, but
neither works:

Cells(pasterow, pastecol).FormulaR1C1 = "=HYPERLINK("C:\1. ACTIVE
CLIENTS\"&client_folder,client_folder)"

but i inserted some spaces to make it:
Cells(pasterow, pastecol).FormulaR1C1 = "=HYPERLINK("C:\1. ACTIVE
CLIENTS\" & client_folder, client_folder)"
neither works

From Nigel:
Cells(pasterow, pastecol).FormulaR1C1 = "=HYPERLINK("C:\1. ACTIVE
CLIENTS\" & client_folder & "," & client_folder & ")""
doesn't work.

Brett

"Bob Phillips" wrote:

=HYPERLINK("C:\1. ACTIVE CLIENTS\"&client_folder,client_folder)


--
__________________________________
HTH

Bob

"Brettjg" wrote in message
...
Blimey, I'll bet I'm not the first to trip up on these! After two hours, I
give in and defer to your superiority!

Using a subroutine I want to create a formula in (say) cell A1. I want the
formula in the cell to read:
=HYPERLINK("C:\1. ACTIVE CLIENTS\Duke, E","Duke, E")
but the thing is that Duke, E is a variable.

This is set by coding
client_folder = surname & ", " & initial

I know that this works:
Cells(pasterow, pastecol).FormulaR1C1 = "=HYPERLINK(""C:\1. ACTIVE
CLIENTS\Duke, E"",""Duke, E"")"

so now I need the code to replace Duke, E with client_folder.
Help
me, pleeeeeeeeeeeease!






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Quotation Marks

Commas in a folder name?
'--
Sub wtf()
Dim strFirst As String
Dim strClientFolder As String
Dim surname As String
Dim initial As String

surname = "Duke"
initial = "E"
strClientFolder = surname & ", " & initial
strFirst = "C:\1. ACTIVE CLIENTS\" & strClientFolder

Range("B10").Value = "=Hyperlink(""" & strFirst & """, """ & strClientFolder & """)"
End Sub
--
Jim Cone
Portland, Oregon USA



"Brettjg"

wrote in message
Blimey, I'll bet I'm not the first to trip up on these! After two hours, I
give in and defer to your superiority!

Using a subroutine I want to create a formula in (say) cell A1. I want the
formula in the cell to read:
=HYPERLINK("C:\1. ACTIVE CLIENTS\Duke, E","Duke, E")
but the thing is that Duke, E is a variable.

This is set by coding
client_folder = surname & ", " & initial

I know that this works:
Cells(pasterow, pastecol).FormulaR1C1 = "=HYPERLINK(""C:\1. ACTIVE
CLIENTS\Duke, E"",""Duke, E"")"

so now I need the code to replace Duke, E with client_folder. Help
me, pleeeeeeeeeeeease!
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Quotation Marks

Further...
It may be easier to understand what was done when
using a character code instead of the quotation marks.

Range("B11").Value = _
"=Hyperlink(" & Chr$(34) & strFirst & Chr$(34) & ", " & Chr$(34) & strClientFolder & Chr$(34) & ")"
--
Jim Cone
Portland, Oregon USA


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 295
Default Quotation Marks

Hi Jim, that's it! Funny name for a sub though. When I'm testing them I like
the names to start with A_ so they head up the list. Therefore I renamed your
sub Aaah_wtf.

You've probably guessed that this is my solution to the previous problem
with opening folders.

Why don't you like commas and ful stops in folder & file names? I've never
had any problems with them. My Excel crashes are something wierdo to do with
printing either normally or with PDFCreator (every so often it freezes at a
random printjob), but I seem to have coded my way around that today with a
few checks and balances.

Thanks for you help Jim, it's late over here, but wtf. Brett.

"Jim Cone" wrote:

Commas in a folder name?
'--
Sub wtf()
Dim strFirst As String
Dim strClientFolder As String
Dim surname As String
Dim initial As String

surname = "Duke"
initial = "E"
strClientFolder = surname & ", " & initial
strFirst = "C:\1. ACTIVE CLIENTS\" & strClientFolder

Range("B10").Value = "=Hyperlink(""" & strFirst & """, """ & strClientFolder & """)"
End Sub
--
Jim Cone
Portland, Oregon USA



"Brettjg"

wrote in message
Blimey, I'll bet I'm not the first to trip up on these! After two hours, I
give in and defer to your superiority!

Using a subroutine I want to create a formula in (say) cell A1. I want the
formula in the cell to read:
=HYPERLINK("C:\1. ACTIVE CLIENTS\Duke, E","Duke, E")
but the thing is that Duke, E is a variable.

This is set by coding
client_folder = surname & ", " & initial

I know that this works:
Cells(pasterow, pastecol).FormulaR1C1 = "=HYPERLINK(""C:\1. ACTIVE
CLIENTS\Duke, E"",""Duke, E"")"

so now I need the code to replace Duke, E with client_folder. Help
me, pleeeeeeeeeeeease!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Quotation Marks? LinearChaos Excel Worksheet Functions 2 June 25th 06 10:31 PM
Quotation Marks - When and What?? heski Excel Discussion (Misc queries) 2 February 7th 06 12:40 PM
quotation marks JohnF Excel Worksheet Functions 7 February 5th 06 09:33 PM
quotation marks Hippy Excel Programming 2 November 4th 05 11:05 PM
Using quotation marks Mike Collard Excel Programming 4 July 20th 04 08:09 PM


All times are GMT +1. The time now is 01:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"