Function Header Automatically Highlighted Error (VBA)Is there a way to crack the password on an Excel VBA Project?Excel VBA to determine last non-value (IE may have a formula but no value) row in columnHow to avoid using Select in Excel VBAExcel Find a sheet based on nameexcel replace function in access vbaExcel 2016 VBA not writing to unlocked cellVba to Edit Links to Latest File in DirectoryShow only selected table column after filter to new worksheetsUnexpected syntax error when copying Excel VBA code from a Web siteGetting Error "ActiveX component can't create object while connecting with CMS supervisor
Show that if two triangles built on parallel lines, with equal bases have the same perimeter only if they are congruent.
"which" command doesn't work / path of Safari?
Is it possible to make sharp wind that can cut stuff from afar?
If two metric spaces are topologically equivalent (homeomorphic) imply that they are complete?
How old can references or sources in a thesis be?
Prevent a directory in /tmp from being deleted
Mathematical cryptic clues
Japan - Plan around max visa duration
Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)
Do VLANs within a subnet need to have their own subnet for router on a stick?
Can you tell me why doing scalar multiplication of a point on a Elliptic curve over a finite field gets to a point at infinity?
The use of multiple foreign keys on same column in SQL Server
same font throughout bibliography
Type 1 Error & Type 2 Error's pregnancy test analogy: is it legit?
Basic combinations logic doubt in probability
Magento 2: Admin panel 3 level menu structure not working
How to re-create Edward Weson's Pepper No. 30?
Risk of getting Chronic Wasting Disease (CWD) in the United States?
Smoothness of finite-dimensional functional calculus
Theorems that impeded progress
Why linear maps act like matrix multiplication?
Can I interfere when another player is about to be attacked?
How do I create uniquely male characters?
Why does Kotter return in Welcome Back Kotter?
Function Header Automatically Highlighted Error (VBA)
Is there a way to crack the password on an Excel VBA Project?Excel VBA to determine last non-value (IE may have a formula but no value) row in columnHow to avoid using Select in Excel VBAExcel Find a sheet based on nameexcel replace function in access vbaExcel 2016 VBA not writing to unlocked cellVba to Edit Links to Latest File in DirectoryShow only selected table column after filter to new worksheetsUnexpected syntax error when copying Excel VBA code from a Web siteGetting Error "ActiveX component can't create object while connecting with CMS supervisor
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
After running my VBA code, the Function Header was suddenly highlighted. Anybody know why this might be happening and how I can fix this? Thanks! Click here to view a screenshot.
Code:
Function isDup(tweet1 As String, tweet2 As String, threshold As Double) As Boolean
Dim sameWordCount As Integer
Dim i As Integer
Dim j As Integer
Dim numOfWords As Integer
sameWordCount = 0
words1 = Split(tweet1)
words2 = Split(tweet2)
If (UBound(words1) - LBound(words1) + 1) >= (UBound(words2) - LBound(words2) + 1) Then
numOfWords = UBound(words2) - LBound(words2) + 1
For i = LBound(words2) To UBound(words2)
Debug.Print "i: " & i & "/" & UBound(words2)
For j = LBound(words1) To UBound(words1)
Debug.Print "j: " & j & "/" & UBound(words1)
If StrComp(words1(i), words2(j), vbTextCompare) = 0 Then
sameWordCount = sameWordCount + 1
Exit For
End If
Next j
Next i
If threshold * (UBound(words1) - LBound(words1) + 1) > sameWordCount Then
isDup = False
Else
isDup = True
End If
Else
numOfWords = UBound(words1) - LBound(words1) + 1
For i = LBound(words1) To UBound(words1)
For j = LBound(words2) To UBound(words2)
If StrComp(words1(i), words2(j), vbTextCompare) = 0 Then
sameWordCount = sameWordCount + 1
Exit For
End If
Next j
Next i
If threshold * (UBound(words2) - LBound(words2) + 1) > sameWordCount Then
isDup = False
Else
isDup = True
End If
End If
Debug.Print sameWordCount & "/" & numOfWords & " words the same"
excel vba
add a comment |
After running my VBA code, the Function Header was suddenly highlighted. Anybody know why this might be happening and how I can fix this? Thanks! Click here to view a screenshot.
Code:
Function isDup(tweet1 As String, tweet2 As String, threshold As Double) As Boolean
Dim sameWordCount As Integer
Dim i As Integer
Dim j As Integer
Dim numOfWords As Integer
sameWordCount = 0
words1 = Split(tweet1)
words2 = Split(tweet2)
If (UBound(words1) - LBound(words1) + 1) >= (UBound(words2) - LBound(words2) + 1) Then
numOfWords = UBound(words2) - LBound(words2) + 1
For i = LBound(words2) To UBound(words2)
Debug.Print "i: " & i & "/" & UBound(words2)
For j = LBound(words1) To UBound(words1)
Debug.Print "j: " & j & "/" & UBound(words1)
If StrComp(words1(i), words2(j), vbTextCompare) = 0 Then
sameWordCount = sameWordCount + 1
Exit For
End If
Next j
Next i
If threshold * (UBound(words1) - LBound(words1) + 1) > sameWordCount Then
isDup = False
Else
isDup = True
End If
Else
numOfWords = UBound(words1) - LBound(words1) + 1
For i = LBound(words1) To UBound(words1)
For j = LBound(words2) To UBound(words2)
If StrComp(words1(i), words2(j), vbTextCompare) = 0 Then
sameWordCount = sameWordCount + 1
Exit For
End If
Next j
Next i
If threshold * (UBound(words2) - LBound(words2) + 1) > sameWordCount Then
isDup = False
Else
isDup = True
End If
End If
Debug.Print sameWordCount & "/" & numOfWords & " words the same"
excel vba
please post the code not an image of the code
– Book Of Zeus
Mar 9 at 3:34
Done! @BookOfZeus
– TheInspiredStudent
Mar 9 at 3:43
1
what was the error message shown? Where is your End Function line?
– QHarr
Mar 9 at 6:39
How are you calling this function?
– Tim Williams
Mar 9 at 7:37
add a comment |
After running my VBA code, the Function Header was suddenly highlighted. Anybody know why this might be happening and how I can fix this? Thanks! Click here to view a screenshot.
Code:
Function isDup(tweet1 As String, tweet2 As String, threshold As Double) As Boolean
Dim sameWordCount As Integer
Dim i As Integer
Dim j As Integer
Dim numOfWords As Integer
sameWordCount = 0
words1 = Split(tweet1)
words2 = Split(tweet2)
If (UBound(words1) - LBound(words1) + 1) >= (UBound(words2) - LBound(words2) + 1) Then
numOfWords = UBound(words2) - LBound(words2) + 1
For i = LBound(words2) To UBound(words2)
Debug.Print "i: " & i & "/" & UBound(words2)
For j = LBound(words1) To UBound(words1)
Debug.Print "j: " & j & "/" & UBound(words1)
If StrComp(words1(i), words2(j), vbTextCompare) = 0 Then
sameWordCount = sameWordCount + 1
Exit For
End If
Next j
Next i
If threshold * (UBound(words1) - LBound(words1) + 1) > sameWordCount Then
isDup = False
Else
isDup = True
End If
Else
numOfWords = UBound(words1) - LBound(words1) + 1
For i = LBound(words1) To UBound(words1)
For j = LBound(words2) To UBound(words2)
If StrComp(words1(i), words2(j), vbTextCompare) = 0 Then
sameWordCount = sameWordCount + 1
Exit For
End If
Next j
Next i
If threshold * (UBound(words2) - LBound(words2) + 1) > sameWordCount Then
isDup = False
Else
isDup = True
End If
End If
Debug.Print sameWordCount & "/" & numOfWords & " words the same"
excel vba
After running my VBA code, the Function Header was suddenly highlighted. Anybody know why this might be happening and how I can fix this? Thanks! Click here to view a screenshot.
Code:
Function isDup(tweet1 As String, tweet2 As String, threshold As Double) As Boolean
Dim sameWordCount As Integer
Dim i As Integer
Dim j As Integer
Dim numOfWords As Integer
sameWordCount = 0
words1 = Split(tweet1)
words2 = Split(tweet2)
If (UBound(words1) - LBound(words1) + 1) >= (UBound(words2) - LBound(words2) + 1) Then
numOfWords = UBound(words2) - LBound(words2) + 1
For i = LBound(words2) To UBound(words2)
Debug.Print "i: " & i & "/" & UBound(words2)
For j = LBound(words1) To UBound(words1)
Debug.Print "j: " & j & "/" & UBound(words1)
If StrComp(words1(i), words2(j), vbTextCompare) = 0 Then
sameWordCount = sameWordCount + 1
Exit For
End If
Next j
Next i
If threshold * (UBound(words1) - LBound(words1) + 1) > sameWordCount Then
isDup = False
Else
isDup = True
End If
Else
numOfWords = UBound(words1) - LBound(words1) + 1
For i = LBound(words1) To UBound(words1)
For j = LBound(words2) To UBound(words2)
If StrComp(words1(i), words2(j), vbTextCompare) = 0 Then
sameWordCount = sameWordCount + 1
Exit For
End If
Next j
Next i
If threshold * (UBound(words2) - LBound(words2) + 1) > sameWordCount Then
isDup = False
Else
isDup = True
End If
End If
Debug.Print sameWordCount & "/" & numOfWords & " words the same"
excel vba
excel vba
edited Mar 11 at 13:17
Pᴇʜ
25.1k63052
25.1k63052
asked Mar 9 at 3:28
TheInspiredStudentTheInspiredStudent
11
11
please post the code not an image of the code
– Book Of Zeus
Mar 9 at 3:34
Done! @BookOfZeus
– TheInspiredStudent
Mar 9 at 3:43
1
what was the error message shown? Where is your End Function line?
– QHarr
Mar 9 at 6:39
How are you calling this function?
– Tim Williams
Mar 9 at 7:37
add a comment |
please post the code not an image of the code
– Book Of Zeus
Mar 9 at 3:34
Done! @BookOfZeus
– TheInspiredStudent
Mar 9 at 3:43
1
what was the error message shown? Where is your End Function line?
– QHarr
Mar 9 at 6:39
How are you calling this function?
– Tim Williams
Mar 9 at 7:37
please post the code not an image of the code
– Book Of Zeus
Mar 9 at 3:34
please post the code not an image of the code
– Book Of Zeus
Mar 9 at 3:34
Done! @BookOfZeus
– TheInspiredStudent
Mar 9 at 3:43
Done! @BookOfZeus
– TheInspiredStudent
Mar 9 at 3:43
1
1
what was the error message shown? Where is your End Function line?
– QHarr
Mar 9 at 6:39
what was the error message shown? Where is your End Function line?
– QHarr
Mar 9 at 6:39
How are you calling this function?
– Tim Williams
Mar 9 at 7:37
How are you calling this function?
– Tim Williams
Mar 9 at 7:37
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55073710%2ffunction-header-automatically-highlighted-error-vba%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55073710%2ffunction-header-automatically-highlighted-error-vba%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
please post the code not an image of the code
– Book Of Zeus
Mar 9 at 3:34
Done! @BookOfZeus
– TheInspiredStudent
Mar 9 at 3:43
1
what was the error message shown? Where is your End Function line?
– QHarr
Mar 9 at 6:39
How are you calling this function?
– Tim Williams
Mar 9 at 7:37