Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Method 'Microsoft.VisualBasic.Strings.Replace' not found.

Status
Not open for further replies.

christer99

IS-IT--Management
Dec 3, 2001
247
Getting this error Method 'Microsoft.VisualBasic.Strings.Replace' not found.
in Visual Studio 2005 at compile time.

for this line: propfiles3 = Microsoft.VisualBasic.Strings.Replace(propfiles3, ".dot", "")

Have tried with and without: Imports Microsoft.VisualBasic


 
That works if I only have one replace, but if I replace multiple words from the same file, I am running into an error: The variable 'Propfiles5' is either undeclared or was never assigned.



Propfiles5 = propfiles3.Replace(".dot", "")
Propfiles5 = Propfiles5.Replace("Proposal-PRO", "")
Propfiles5 = Propfiles5.Replace("Proposal-INM", "")
Propfiles5 = Propfiles5.Replace("Proposal-CAST", "")
Propfiles5 = Propfiles5.Replace("Proposal-STAFFING", "")
Propfiles5 = Propfiles5.Replace("Proposal-GASTON", "")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top