---
title: "Felmeddelande på fixaTecken"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/64667-felmeddelande-på-fixatecken"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "Addeladde"
published: "2003-01-13T13:10:14.000Z"
updated: "2003-01-13T13:13:47.000Z"
replies: 2
views: 201
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/64667-felmeddelande-på-fixatecken"
---

# Felmeddelande på fixaTecken

## #1 — Addeladde, 2003-01-13T13:10Z

Hej

Jag får felmeddelande på den här koden:

```
Function FixaTecken(sfix)
sfix = Replace(Trim(sfix), "'", "''")
sfix = Replace(sfix, "|", "")
FixaTecken = sfix
End Function
```

> Körningsfel i Microsoft VBScript (0x800A005E)
> Ogiltig användning av Null: 'replace'

Permalänk: https://www.webforum.nu/p/64667

## #2 — @nders, 2003-01-13T13:11Z

Du kan inte använda strängfunktioner på nullvärden. Du får se till att göra om null till tom sträng först.

```
Function FixaTecken(sfix)
[b]sfix = "" & sfix[/b]
sfix = Replace(Trim(sfix), "'", "''")
sfix = Replace(sfix, "|", "")
FixaTecken = sfix
End Function
```

Mvh,

Permalänk: https://www.webforum.nu/p/911240

## #3 — Addeladde, 2003-01-13T13:13Z

Tack!

Permalänk: https://www.webforum.nu/p/911241

---

Tråden på webben: https://www.webforum.nu/amne/asp/64667-felmeddelande-på-fixatecken
